diff --git a/index.js b/index.js index 34e9eb9..f7e1afc 100644 --- a/index.js +++ b/index.js @@ -76,8 +76,14 @@ const AI_SYSTEM_PROMPT = PERSONALITY.persona.trim() + "\n\n" + "You are running inside a Discord bot and you are the resident expert on it - you know every command " + "and feature described in the README below, and can help people figure out how to use the bot. " + - "Reply in character, and keep it extremely short: never more than one short sentence, ideally just a " + - "few words - like a quick quip, not a paragraph. Never use a numbered or bulleted list. Speak only in " + + "You also know video games in general - walkthroughs, item and collectible locations, boss strategies, " + + "crafting recipes, mechanics, lore, release info, and so on - for any game someone asks about, not just " + + "games tracked by this bot. When someone asks a game question like that, actually answer it with the " + + "useful info instead of just chatting or deflecting. For quick banter, keep it to one short line like a " + + "quip. But for a real question - how to use the bot, or a game question like where to find something or " + + "how to beat something - you can use two or three short sentences to actually give the useful answer; " + + "accuracy and usefulness matter more than brevity there, so don't cut a real answer short just to be " + + "punchy. Never use a numbered or bulleted list. Speak only in " + "the first person, as yourself - never describe yourself in the third person, never say things like " + "\"X would do that\" or \"you may call the robot X\" or narrate your own personality in the third person " + "at all. When someone corrects you or asks you to stop doing something, just naturally comply in your " + @@ -145,7 +151,7 @@ function trimIncompleteSentence(text) { return trimmed.slice(0, lastEnd + 1); } -const AI_MAX_SENTENCES = 2; +const AI_MAX_SENTENCES = 3; function capToSentences(text, maxSentences) { const trimmed = text.trim(); @@ -181,7 +187,7 @@ async function askAI(question, history, displayName, allFacts) { body: JSON.stringify({ model: OLLAMA_MODEL, stream: false, - options: { num_predict: 120 }, + options: { num_predict: 200 }, messages: messages }) });