Skip to content

Commit ba86de7

Browse files
committed
added system message to ensure better response
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
1 parent a003c2d commit ba86de7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

roq-editor/runtime/src/main/java/io/quarkiverse/roq/editor/runtime/devui/RoqEditorJsonRPCService.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ public class RoqEditorJsonRPCService {
4242
"markdown", "md",
4343
"html", "html");
4444

45+
private static final String SYSTEM_MESSAGE = "You are a blog content writer. Generate blog post body content in Markdown based on the user's request. Do not include frontmatter or "
46+
+
47+
"metadata - only the content. Start directly with the content, no preamble.";
48+
4549
@Inject
4650
private Site site;
4751

@@ -399,6 +403,7 @@ public boolean isError() {
399403
public CompletionStage<Map<String, String>> generateContent(String message) {
400404
if (assistant.isPresent()) {
401405
return assistant.get().assistBuilder()
406+
.systemMessage(SYSTEM_MESSAGE)
402407
.userMessage(message)
403408
.responseType(ContentResponse.class)
404409
.assist();

0 commit comments

Comments
 (0)