mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-03 17:08:29 +00:00
Add interface for listing LLM models.
This commit is contained in:
@@ -26,4 +26,9 @@ std::string TracyLlm::GetVersion() const
|
||||
return m_ollama->get_version();
|
||||
}
|
||||
|
||||
std::vector<std::string> TracyLlm::GetModels() const
|
||||
{
|
||||
return m_ollama->list_models();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define __TRACYLLM_HPP__
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
class Ollama;
|
||||
|
||||
@@ -16,6 +18,7 @@ public:
|
||||
|
||||
[[nodiscard]] bool IsValid() const { return m_valid; }
|
||||
[[nodiscard]] std::string GetVersion() const;
|
||||
[[nodiscard]] std::vector<std::string> GetModels() const;
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ollama> m_ollama;
|
||||
|
||||
Reference in New Issue
Block a user