From 08c877c4ef277631a71fdfdbf4869fef1efb5b59 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 11 May 2025 17:24:33 +0200 Subject: [PATCH] Add interface for listing LLM models. --- profiler/src/profiler/TracyLlm.cpp | 5 +++++ profiler/src/profiler/TracyLlm.hpp | 3 +++ 2 files changed, 8 insertions(+) diff --git a/profiler/src/profiler/TracyLlm.cpp b/profiler/src/profiler/TracyLlm.cpp index 1c86f943..70562158 100644 --- a/profiler/src/profiler/TracyLlm.cpp +++ b/profiler/src/profiler/TracyLlm.cpp @@ -26,4 +26,9 @@ std::string TracyLlm::GetVersion() const return m_ollama->get_version(); } +std::vector TracyLlm::GetModels() const +{ + return m_ollama->list_models(); +} + } diff --git a/profiler/src/profiler/TracyLlm.hpp b/profiler/src/profiler/TracyLlm.hpp index 30bd749e..d9a8f818 100644 --- a/profiler/src/profiler/TracyLlm.hpp +++ b/profiler/src/profiler/TracyLlm.hpp @@ -2,6 +2,8 @@ #define __TRACYLLM_HPP__ #include +#include +#include class Ollama; @@ -16,6 +18,7 @@ public: [[nodiscard]] bool IsValid() const { return m_valid; } [[nodiscard]] std::string GetVersion() const; + [[nodiscard]] std::vector GetModels() const; private: std::unique_ptr m_ollama;