ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
foresthub::provider::remote::ForestHubProvider Class Reference

Provider implementation that communicates with the ForestHub backend via HTTP. More...

#include <foresthub.hpp>

Inheritance diagram for foresthub::provider::remote::ForestHubProvider:
foresthub::core::Provider foresthub::core::LLMClient

Public Member Functions

 ForestHubProvider (const config::ProviderConfig &cfg, std::shared_ptr< foresthub::core::HttpClient > http_client)
 Construct a ForestHub provider from configuration.
core::ProviderID ProviderId () const override
 Returns "forest-hub" as the provider identifier.
std::string Health () const override
 Check that the remote provider is reachable and responding.
std::shared_ptr< core::ChatResponseChat (const core::ChatRequest &req) override
 Send a chat completion request to the backend.
bool SupportsModel (const core::ModelID &model) const override
 Check if this provider lists the model as supported.

Detailed Description

Provider implementation that communicates with the ForestHub backend via HTTP.

Constructor & Destructor Documentation

◆ ForestHubProvider()

foresthub::provider::remote::ForestHubProvider::ForestHubProvider ( const config::ProviderConfig & cfg,
std::shared_ptr< foresthub::core::HttpClient > http_client )

Construct a ForestHub provider from configuration.

Parameters
cfgProvider configuration (api_key, base_url, supported_models).
http_clientHTTP implementation for API calls.

Member Function Documentation

◆ Chat()

std::shared_ptr< core::ChatResponse > foresthub::provider::remote::ForestHubProvider::Chat ( const core::ChatRequest & req)
overridevirtual

Send a chat completion request to the backend.

Parameters
reqChat request with model, input, and options.
Returns
Chat response from the backend, or nullptr on error.

Implements foresthub::core::LLMClient.

◆ Health()

std::string foresthub::provider::remote::ForestHubProvider::Health ( ) const
overridevirtual

Check that the remote provider is reachable and responding.

Returns
Error message on failure, empty on success.

Implements foresthub::core::Provider.

◆ SupportsModel()

bool foresthub::provider::remote::ForestHubProvider::SupportsModel ( const core::ModelID & model) const
overridevirtual

Check if this provider lists the model as supported.

Parameters
modelModel identifier to check.

Implements foresthub::core::Provider.


The documentation for this class was generated from the following file: