From 218cbce468030c35d4e9157cda5a6a663f7633db Mon Sep 17 00:00:00 2001 From: Nate Date: Sat, 22 Feb 2025 17:46:18 -0800 Subject: [PATCH] info string system message --- core/llm/constructMessages.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/llm/constructMessages.ts b/core/llm/constructMessages.ts index fba67827d..0e4533ceb 100644 --- a/core/llm/constructMessages.ts +++ b/core/llm/constructMessages.ts @@ -15,14 +15,12 @@ function constructSystemPrompt( modelDescription: ModelDescription, useTools: boolean, ): string | null { - let systemMessage = ""; + let systemMessage = + "Always include the language and file name in the info string when you write code blocks, for example '```python file.py'."; if (useTools && modelSupportsTools(modelDescription)) { - if (systemMessage) { - systemMessage += "\n\n"; - } - systemMessage += TOOL_USE_RULES; + systemMessage += "\n\n" + TOOL_USE_RULES; } - return systemMessage || null; + return systemMessage; } const CANCELED_TOOL_CALL_MESSAGE =