ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
provider.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (c) 2026 ForestHub. All rights reserved.
3// For commercial licensing, visit https://github.com/ForestHubAI/fh-sdk
4
5#ifndef FORESTHUB_CORE_PROVIDER_HPP
6#define FORESTHUB_CORE_PROVIDER_HPP
7
10
11#include <memory>
12#include <string>
13
16
17namespace foresthub {
18namespace core {
19
21class LLMClient {
22public:
23 virtual ~LLMClient() = default;
24
28 virtual std::shared_ptr<ChatResponse> Chat(const ChatRequest& req) = 0;
29};
30
32class Provider : public LLMClient {
33public:
34 virtual ~Provider() = default;
35
37 virtual ProviderID ProviderId() const = 0;
38
41 virtual std::string Health() const = 0;
42
46 virtual bool SupportsModel(const ModelID& model) const = 0;
47};
48
49} // namespace core
50} // namespace foresthub
51
52#endif // FORESTHUB_CORE_PROVIDER_HPP
Abstract interface for LLM chat operations.
Definition provider.hpp:21
virtual std::shared_ptr< ChatResponse > Chat(const ChatRequest &req)=0
Perform a chat completion request.
Extended LLM interface with health checks and model discovery.
Definition provider.hpp:32
virtual ProviderID ProviderId() const =0
Returns the unique identifier of this provider.
virtual bool SupportsModel(const ModelID &model) const =0
Check if this provider supports the given model.
virtual std::string Health() const =0
Verify the LLM service is available.
ChatRequest and ChatResponse types with fluent builder API.
Model metadata and capability identifiers.
Core abstractions: requests, responses, tools, input types, and provider interface.
std::string ModelID
Unique identifier for an LLM model.
Definition model.hpp:23
std::string ProviderID
Unique identifier for an LLM provider.
Definition model.hpp:20
Top-level namespace for the ForestHub SDK.
Chat completion request sent to an LLM provider.
Definition types.hpp:39