MME-4 Include recipe title requirement in summary prompt.
This commit is contained in:
parent
8018301d3c
commit
45c71ed0d8
@ -50,7 +50,11 @@ public class RecipeSummaryJobHandler implements JobHandler<RecipeSummaryJobHandl
|
|||||||
.orElseThrow(() -> new NoSuchEntityWithIdException(Recipe.class, payload.recipeId()));
|
.orElseThrow(() -> new NoSuchEntityWithIdException(Recipe.class, payload.recipeId()));
|
||||||
final @Nullable String summary = this.inferenceService.infer(List.of(
|
final @Nullable String summary = this.inferenceService.infer(List.of(
|
||||||
SystemMessage.builder()
|
SystemMessage.builder()
|
||||||
.text("Summarize the given recipe in three sentences or less. Output your summary as plain text.")
|
.text(
|
||||||
|
"Summarize the given recipe in three sentences or less. " +
|
||||||
|
"Output your summary as plain text. " +
|
||||||
|
"Make sure to include the title of the recipe in your summary."
|
||||||
|
)
|
||||||
.build(),
|
.build(),
|
||||||
UserMessage.builder().text(
|
UserMessage.builder().text(
|
||||||
"<title>" + recipe.getTitle() + "</title>\n" + recipe.getRawText()
|
"<title>" + recipe.getTitle() + "</title>\n" + recipe.getRawText()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user