5#ifndef FORESTHUB_CLIENT_HPP
6#define FORESTHUB_CLIENT_HPP
36 const std::shared_ptr<core::HttpClient>& http_client =
nullptr);
57 const std::map<core::ProviderID, std::shared_ptr<core::Provider>>&
providers()
const {
return providers_; }
60 std::map<core::ProviderID, std::shared_ptr<core::Provider>> providers_;
63 std::shared_ptr<core::Provider> InferProvider(
const core::ModelID& model)
const;
bool SupportsModel(const core::ModelID &model) const
Check if any registered provider supports the given model.
std::shared_ptr< core::ChatResponse > Chat(const core::ChatRequest &req) override
Send a chat request, auto-selecting the provider by model ID.
static std::unique_ptr< Client > Create(const config::ClientConfig &cfg, const std::shared_ptr< core::HttpClient > &http_client=nullptr)
Create and initialize a Client from configuration.
Client()
Default constructor. Prefer Client::Create() for initialization.
std::string Health() const
Check health of all registered providers.
const std::map< core::ProviderID, std::shared_ptr< core::Provider > > & providers() const
Read-only access to the registered providers.
Definition client.hpp:57
void RegisterProvider(const std::shared_ptr< core::Provider > &provider)
Register a provider instance manually.
Abstract interface for LLM chat operations.
Definition provider.hpp:21
Client and provider configuration types.
ChatRequest and ChatResponse types with fluent builder API.
Abstract HTTP client interface and response type.
Model metadata and capability identifiers.
std::string ModelID
Unique identifier for an LLM model.
Definition model.hpp:23
LLM provider implementations.
Top-level namespace for the ForestHub SDK.
LLMClient and Provider interfaces for chat operations.
Top-level client configuration controlling which providers are created.
Definition config.hpp:48
Chat completion request sent to an LLM provider.
Definition types.hpp:39