45 const std::string& model =
"llama3.2",
46 const std::string& baseUrl =
"");
49 std::string
SendPrompt(
const std::string& prompt,
50 std::function<
void(
const std::string&)> callback =
nullptr)
override;
61 void SetApiKey(
const std::string& apiKey);
84 const std::string& jsonBody)
const;
85 std::string
SendHttpGet(
const std::string& endpoint)
const;
Interface for AI service communication.
Definition IAIService.hpp:14
Generic client for communicating with LLM services.
Definition LLMClient.hpp:42
void SetModelName(const std::string &model) override
Definition LLMClient.cpp:51
std::string GetBaseUrl() const
Definition LLMClient.hpp:64
std::string BuildRequestBody(const std::string &prompt) const
Definition LLMClient.cpp:126
static std::string GetDefaultBaseUrl(LLMProvider provider)
Get default base URL for a provider.
Definition LLMClient.cpp:103
std::vector< ModelInfo > GetInstalledModels() const
Get list of installed models (Ollama/LM Studio only)
Definition LLMClient.cpp:96
std::string GetProviderName() const override
Get the name of the AI provider.
Definition LLMClient.cpp:57
std::string m_baseUrl
Definition LLMClient.hpp:80
std::string ParseResponse(const std::string &response) const
Definition LLMClient.cpp:131
std::string m_model
Definition LLMClient.hpp:79
LLMProvider m_provider
Definition LLMClient.hpp:78
std::string GetServiceId() const override
Unique identifier for this service instance.
Definition LLMClient.cpp:69
std::string SendPrompt(const std::string &prompt, std::function< void(const std::string &)> callback=nullptr) override
Send a prompt to the AI and get a response.
Definition LLMClient.cpp:33
~LLMClient() override=default
std::string SendHttpGet(const std::string &endpoint) const
Definition LLMClient.cpp:121
std::string SendHttpPost(const std::string &endpoint, const std::string &jsonBody) const
Definition LLMClient.cpp:115
void SetProvider(LLMProvider provider)
Definition LLMClient.cpp:80
std::string GetModelName() const override
Get the name of the model being used.
Definition LLMClient.cpp:46
std::string m_apiKey
Definition LLMClient.hpp:81
LLMProvider GetProvider() const
Definition LLMClient.hpp:63
void SetBaseUrl(const std::string &url)
Definition LLMClient.cpp:74
bool IsAvailable() const override
Check if the AI service is available.
Definition LLMClient.cpp:40
void SetApiKey(const std::string &apiKey)
Definition LLMClient.cpp:90
Definition GemmaInferenceEngine.cpp:18
LLMProvider
Type of LLM service provider.
Definition LLMClient.hpp:15
Information about an installed model.
Definition LLMClient.hpp:26
std::string size
Definition LLMClient.hpp:28
std::string modified
Definition LLMClient.hpp:29
std::string name
Definition LLMClient.hpp:27