optional usage of names in prompt

This commit is contained in:
2026-01-16 16:14:40 +03:00
parent c491329d4f
commit 97582881ea
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ export class OllamaChat extends ChatCommand {
const chatMessages = messageParts.map((part, i) => {
return {
role: part.bot ? "assistant" : "user",
content: (Environment.USE_NAMES_IN_PROMPT ? `MESSAGE FROM USER "${part.name}":\n` : "") + extractText(part.content, Environment.BOT_PREFIX),
content: (Environment.USE_NAMES_IN_PROMPT && !part.bot ? `MESSAGE FROM USER "${part.name}":\n` : "") + extractText(part.content, Environment.BOT_PREFIX),
images: imageFilePath && i === 0 ? [imageFilePath] : null
};
});