mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-02 00:18:23 +00:00
Move LLM system prompt to an external file.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.21)
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
|
||||
option(NO_FILESELECTOR "Disable the file selector" OFF)
|
||||
option(GTK_FILESELECTOR "Use the GTK file selector on Linux instead of the xdg-portal one" OFF)
|
||||
@@ -120,6 +120,8 @@ set(PROFILER_FILES
|
||||
src/winmainArchDiscovery.cpp
|
||||
)
|
||||
|
||||
Embed(PROFILER_FILES SystemPrompt src/llm/system.prompt)
|
||||
|
||||
set(INCLUDES "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
set(LIBS "")
|
||||
|
||||
|
||||
1
profiler/src/llm/system.prompt
Normal file
1
profiler/src/llm/system.prompt
Normal file
@@ -0,0 +1 @@
|
||||
You are a helpful assistant operating in context of Tracy Profiler, a C++ real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications.
|
||||
@@ -2,10 +2,13 @@
|
||||
#include <ollama.hpp>
|
||||
|
||||
#include "TracyConfig.hpp"
|
||||
#include "TracyEmbed.hpp"
|
||||
#include "TracyImGui.hpp"
|
||||
#include "TracyLlm.hpp"
|
||||
#include "TracyPrint.hpp"
|
||||
|
||||
#include "data/SystemPrompt.hpp"
|
||||
|
||||
extern tracy::Config s_config;
|
||||
|
||||
namespace tracy
|
||||
@@ -464,8 +467,9 @@ void TracyLlm::UpdateModels()
|
||||
|
||||
void TracyLlm::ResetChat()
|
||||
{
|
||||
Unembed( SystemPrompt );
|
||||
m_chat = std::make_unique<ollama::messages>();
|
||||
m_chat->emplace_back( ollama::message( "system", "You are a helpful assistant operating in context of Tracy Profiler, a C++ real time, nanosecond resolution, remote telemetry, hybrid frame and sampling profiler for games and other applications." ) );
|
||||
m_chat->emplace_back( ollama::message( "system", std::string( SystemPrompt->data(), SystemPrompt->size() ) ) );
|
||||
}
|
||||
|
||||
void TracyLlm::SendMessage( ollama::messages&& messages )
|
||||
|
||||
Reference in New Issue
Block a user