mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-01 07:58:31 +00:00
Do system prompt tag injection properly.
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user