mirror of
https://github.com/wolfpld/tracy.git
synced 2026-08-31 23:48:26 +00:00
Store selected LLM model.
This commit is contained in:
@@ -237,6 +237,7 @@ static void LoadConfig()
|
||||
if( ini_sget( ini, "ui", "userScale", "%lf", &v1 ) && v1 > 0.0 && s_config.saveUserScale ) s_config.userScale = v1;
|
||||
if( ini_sget( ini, "llm", "enabled", "%d", &v ) ) s_config.llm = v;
|
||||
if( v2 = ini_get( ini, "llm", "address" ); v2 ) s_config.llmAddress = v2;
|
||||
if( v2 = ini_get( ini, "llm", "model" ); v2 ) s_config.llmModel = v2;
|
||||
|
||||
ini_free( ini );
|
||||
}
|
||||
@@ -274,6 +275,7 @@ static bool SaveConfig()
|
||||
fprintf( f, "\n[llm]\n" );
|
||||
fprintf( f, "enabled = %i\n", (int)s_config.llm );
|
||||
fprintf( f, "address = %s\n", s_config.llmAddress.c_str() );
|
||||
fprintf( f, "model = %s\n", s_config.llmModel.c_str() );
|
||||
|
||||
fclose( f );
|
||||
return true;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef __TRACYCONFIG_HPP__
|
||||
#define __TRACYCONFIG_HPP__
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "TracyUtility.hpp"
|
||||
|
||||
namespace tracy
|
||||
@@ -24,6 +26,7 @@ struct Config
|
||||
float userScale = 1.0f;
|
||||
bool llm = true;
|
||||
std::string llmAddress = "http://localhost:11434";
|
||||
std::string llmModel;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user