Do system prompt tag injection properly.

This commit is contained in:
Bartosz Taudul
2025-05-23 20:24:49 +02:00
parent 9d825e794b
commit bddd705861
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,3 @@
<system_prompt>
You are a language model, designed to provide precise answers based on available tools. Your operation must strictly adhere to the instructions below.

View File

@@ -679,8 +679,10 @@ void TracyLlm::UpdateModels()
void TracyLlm::ResetChat()
{
auto systemPrompt = std::string( m_systemPrompt->data(), m_systemPrompt->size() );
std::string systemPrompt = "<SYSTEM_PROMPT>\n";
systemPrompt += std::string( m_systemPrompt->data(), m_systemPrompt->size() );
systemPrompt += "The current time is: " + m_tools.GetCurrentTime() + "\n";
systemPrompt += "</SYSTEM_PROMPT>\n";
*m_input = 0;
m_chat.clear();