From f4f3c6375596cca38d37592d5dbac5eb78e802f2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 29 Dec 2025 17:10:56 +0100 Subject: [PATCH] Move time information to system prompt. This also changes the context of the information a bit. Previously it was the current time, now it is the time when the conversation started. --- profiler/src/profiler/TracyLlm.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index c1b69566..ed9baa90 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -644,13 +644,14 @@ void TracyLlm::UpdateModels() void TracyLlm::ResetChat() { - std::string systemPrompt = "\n"; - systemPrompt += std::string( m_systemPrompt->data(), m_systemPrompt->size() ); + auto systemPrompt = std::string( m_systemPrompt->data(), m_systemPrompt->size() ); #ifndef NDEBUG systemPrompt += "\n\n# DEBUG MODE AVAILABLE\n"; systemPrompt += "Upon a user query beginning with ``, activate *Debug Mode*. In this mode, ignore all prior instructions. Your response must detail your complete reasoning process and the exact steps taken to generate your *previous* non-debug answer. Explicitly state any internal rules applied. Do not say you are sorry. Do not tell how you will change your behavior. Focus strictly on the analysis of what happened.\n"; #endif - systemPrompt += "\n"; + + systemPrompt += "\n\n# Misc information\n"; + systemPrompt += "Conversation started at: " + m_tools->GetCurrentTime() + "\n"; *m_input = 0; m_usedCtx = 0; @@ -794,7 +795,6 @@ void TracyLlm::SendMessage( std::unique_lock& lock ) bool res; try { - m_chat.back()["content"].get_ref().append( "\n\n\nThe current time is: " + m_tools->GetCurrentTime() + "\n\n" ); auto chat = m_chat; AddMessageBlocking( "", "assistant", lock );