ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
serialization.hpp File Reference

JSON serialization and deserialization for core types. More...

Go to the source code of this file.

Namespaces

namespace  foresthub
 Top-level namespace for the ForestHub SDK.
namespace  foresthub::core
 Core abstractions: requests, responses, tools, input types, and provider interface.

Functions

void foresthub::core::to_json (json &j, const Options &opts)
 Serialize Options to JSON.
void foresthub::core::from_json (const json &j, Options &opts)
 Deserialize Options from JSON.
void foresthub::core::to_json (json &j, const ResponseFormat &format)
 Serialize ResponseFormat to JSON.
void foresthub::core::from_json (const json &j, ResponseFormat &format)
 Deserialize ResponseFormat from JSON.
void foresthub::core::to_json (json &j, const std::shared_ptr< InputItem > &item)
 Serialize an InputItem (dispatches by subtype; nullptr produces JSON null).
void foresthub::core::to_json (json &j, const std::shared_ptr< Tool > &tool)
 Serialize a Tool (dispatches by subtype).
void foresthub::core::to_json (json &j, const ChatRequest &req)
 Serialize ChatRequest to JSON.
void foresthub::core::from_json (const json &j, ChatRequest &req)
 Deserialize ChatRequest from JSON.
void foresthub::core::from_json (const json &j, ChatResponse &resp)
 Deserialize ChatResponse from JSON.

Detailed Description

JSON serialization and deserialization for core types.