One JSON value: null, a boolean, a number, a string, an array or an object.
Definition json.hpp:22
A model behind an API.
Definition provider.hpp:68
The orchestrator's message format, shared by every LLM provider.
std::function< ToolOutcome(const ToolCall &)> ToolExecutor
Runs one tool call. ToolRegistry::executor() provides one; any function works.
Definition tool_loop.hpp:33
ToolLoopResult RunToolLoop(Provider &provider, ChatRequest request, const ToolExecutor &execute, const ToolLoopOptions &options={})
Sends request, runs each tool the model calls with execute, and sends the results back,...
LLM providers: the Anthropic API and OpenAI-compatible servers, behind one interface.
A request to a provider.
Definition message.hpp:99
A provider's answer.
Definition message.hpp:113
One turn of a conversation.
Definition message.hpp:51
Called as a streamed answer arrives. Either may be empty.
Definition provider.hpp:25
Tokens used by one request, or summed over a tool loop.
Definition message.hpp:89