From 79ee17d2f6dbb7e9e1b9ccf0f7c1d612ea5a1ff2 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 28 Dec 2025 18:16:12 +0100 Subject: [PATCH] Inject current time into each user message. This is not removed later on, mainly to enable caching of previous replies (changing any earlier message would require processing everything that's later), but also to give the LLM a sense of passing time. --- profiler/src/profiler/TracyLlm.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index a528eedb..ab6e6811 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -781,11 +781,10 @@ 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 ); - chat.front()["content"].get_ref().append( "\n\nThe current time is: " + m_tools->GetCurrentTime() + "\n" ); - nlohmann::json req; req["model"] = m_api->GetModels()[m_modelIdx].name; req["messages"] = std::move( chat );