|
ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
|
Direct OpenAI provider using the Responses API (POST /v1/responses). More...
#include <openai.hpp>
Public Member Functions | |
| OpenAIProvider (const config::ProviderConfig &cfg, std::shared_ptr< core::HttpClient > http_client) | |
| Construct an OpenAI provider from configuration. | |
| core::ProviderID | ProviderId () const override |
| Returns "openai" as the provider identifier. | |
| std::string | Health () const override |
| Check that the OpenAI API is reachable. | |
| std::shared_ptr< core::ChatResponse > | Chat (const core::ChatRequest &req) override |
| Send a chat request to the OpenAI Responses API. | |
| bool | SupportsModel (const core::ModelID &model) const override |
| Check if this provider handles the given model. | |
Direct OpenAI provider using the Responses API (POST /v1/responses).
| foresthub::provider::remote::OpenAIProvider::OpenAIProvider | ( | const config::ProviderConfig & | cfg, |
| std::shared_ptr< core::HttpClient > | http_client ) |
Construct an OpenAI 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 OpenAI Responses API.
| req | Chat request with model, input, and options. |
Implements foresthub::core::LLMClient.
|
overridevirtual |
Check that the OpenAI 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.