|
NeuralPlus 0.2.0
A small C++17 SDK for AI clients, sessions, tools, and tracing
|
#include <client.hpp>
Public Types | |
| using | Function = std::function< AIResponse(const AIRequest &)> |
| Callback signature for one provider-independent model round. | |
Public Member Functions | |
| FunctionAIClient (ModelDescriptor model, Function function, const ClientOptions &options={}) | |
Creates a client that delegates each model round to function. | |
Public Member Functions inherited from neuralplus::AIClient | |
| 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. | |
Additional Inherited Members | |
Protected Member Functions inherited from neuralplus::AIClient | |
| AIClient (ModelDescriptor model, const ClientOptions &options={}) | |
| Creates a provider client for a model with shared tools, tracing, and transport. | |
| void | trace (const TraceEvent &event) const noexcept |
| Emits a custom event through this client's exception-isolated tracer fan-out. | |
Callback-backed AIClient useful for custom in-process models and tests.
Calls to the supplied callback are serialized so ordinary application callbacks do not need their own synchronization.