NeuralPlus 0.2.0
A small C++17 SDK for AI clients, sessions, tools, and tracing
Loading...
Searching...
No Matches
neuralplus::AIClient Class Referenceabstract

#include <client.hpp>

Inheritance diagram for neuralplus::AIClient:
neuralplus::AnthropicClient neuralplus::FunctionAIClient neuralplus::GeminiClient neuralplus::OpenAIClient neuralplus::OpenAICompatibleClient

Public Member Functions

const ModelDescriptormodel () const noexcept
 Returns the immutable model description used by this client.
 
AIResponse generate (Session &session, const Message &input, const GenerateOptions &options={})
 Generates from one input message and updates the supplied Session.
 
AIResponse generate (Session &session, const std::string &input, const GenerateOptions &options={})
 Convenience overload for text input.
 
AIResponse generate (const Message &input, const GenerateOptions &options={})
 One-shot convenience overload that uses an internal Session.
 
AIResponse generate (const std::string &input, const GenerateOptions &options={})
 One-shot convenience overload for text input.
 

Protected Member Functions

 AIClient (ModelDescriptor model, const ClientOptions &options={})
 Creates a provider client for a model with shared tools, tracing, and transport.
 
virtual AIResponse generate_once (const AIRequest &request)=0
 Performs exactly one provider request without mutating a Session.
 
void trace (const TraceEvent &event) const noexcept
 Emits a custom event through this client's exception-isolated tracer fan-out.
 

Detailed Description

Provider-independent client and complete conversation/tool loop.

Applications normally use a built-in provider from providers.hpp. Custom providers implement only generate_once; session ownership, tracing, and tool execution remain consistent in this base class. One client may serve different Session objects concurrently. A custom generate_once implementation must therefore be thread-safe.


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