From 88a0710c5555bba223d54992911f97f35d28fb47 Mon Sep 17 00:00:00 2001 From: matty Date: Mon, 4 Aug 2025 21:08:47 +0000 Subject: [PATCH] update system prompt to hopefully make it easier for Lexi to understand --- src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 790bcf0..31f5d3d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -97,7 +97,7 @@ const generateOllamaRequest = async ( } // Simplified user message (remove [/INST] as it's not needed for Llama 3) - const userMessage = `${notification.status.account.fqn} says: ${notification.status.pleroma.content["text/plain"]}`; + const userMessage = `${notification.status.account.fqn} says to you: \"${notification.status.pleroma.content["text/plain"]}\".`; let systemContent = ollamaSystemPrompt; if (replyWithContext) { @@ -105,13 +105,13 @@ const generateOllamaRequest = async ( systemContent = `${ollamaSystemPrompt}\n\nPrevious conversation context:\n${conversationHistory .map( (post) => - `${post.account_fqn} (to ${post.mentions.join(", ")}): ${ + `${post.account_fqn} (said to ${post.mentions.join(", ")}): ${ post.plaintext_content }` ) .join( "\n" - )}\nReply as if you are a party to the conversation. When 'nice-ai' or 'Lexi' is mentioned, the user is speaking to or referencing you. Prefix usernames with '@' when addressing them.`; + )}\nReply to the user who addressed you. Examine the context of the entire conversation and make references to topics or information where appropriate. When 'nice-ai' or 'Lexi' is mentioned, the user is speaking to or referencing you. Prefix usernames with '@' when addressing them.`; } // Switch to chat request format (messages array auto-handles Llama 3 template)