|
ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
|
Direct Google Gemini provider using the native generateContent API (v1beta). More...
#include <gemini.hpp>
Public Member Functions | |
| GeminiProvider (const config::ProviderConfig &cfg, std::shared_ptr< core::HttpClient > http_client) | |
| Construct a Gemini provider from configuration. | |
| core::ProviderID | ProviderId () const override |
| Returns "gemini" as the provider identifier. | |
| std::string | Health () const override |
| Check that the Gemini API is reachable. | |
| std::shared_ptr< core::ChatResponse > | Chat (const core::ChatRequest &req) override |
| Send a chat request to the Gemini generateContent API. | |
| bool | SupportsModel (const core::ModelID &model) const override |
| Check if this provider handles the given model. | |
Direct Google Gemini provider using the native generateContent API (v1beta).
Google Search Grounding is supported via the WebSearch tool type, but it cannot be combined with function calling in the same request. When both are present, function calling takes priority and Google Search is silently dropped.
| foresthub::provider::remote::GeminiProvider::GeminiProvider | ( | const config::ProviderConfig & | cfg, |
| std::shared_ptr< core::HttpClient > | http_client ) |
Construct a Gemini provider from configuration.
| cfg | Provider configuration (api_key, base_url, supported_models). |
| http_client | HTTP implementation for API calls. |
|
overridevirtual |
Send a chat request to the Gemini generateContent API.
| req | Chat request with model, input, and options. |
Implements foresthub::core::LLMClient.
|
overridevirtual |
Check that the Gemini API is reachable.
Implements foresthub::core::Provider.
|
overridevirtual |
Check if this provider handles the given model.
| model | Model identifier to check. |
Implements foresthub::core::Provider.