diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 3f1d228c..c470ba02 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -1,13 +1,26 @@ #include +#include "TracyConfig.hpp" #include "TracyLlm.hpp" +extern tracy::Config s_config; + namespace tracy { TracyLlm::TracyLlm() + : m_ollama( std::make_unique( s_config.llmAddress ) ) + , m_valid( m_ollama->is_running() ) { - m_ollama = std::make_unique(); +} + +TracyLlm::~TracyLlm() +{ +} + +std::string TracyLlm::GetVersion() const +{ + return m_ollama->get_version(); } } diff --git a/profiler/src/profiler/TracyLlm.hpp b/profiler/src/profiler/TracyLlm.hpp index 66255e83..30bd749e 100644 --- a/profiler/src/profiler/TracyLlm.hpp +++ b/profiler/src/profiler/TracyLlm.hpp @@ -12,9 +12,14 @@ class TracyLlm { public: TracyLlm(); + ~TracyLlm(); + + [[nodiscard]] bool IsValid() const { return m_valid; } + [[nodiscard]] std::string GetVersion() const; private: std::unique_ptr m_ollama; + bool m_valid; }; }