|
NeuralPlus 0.2.0
A small C++17 SDK for AI clients, sessions, tools, and tracing
|
#include <client.hpp>
Public Member Functions | |
| const ModelDescriptor & | model () 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. | |
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.