|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
Parameters for an LLM completion request. More...
#include <provider.h>
Public Attributes | |
| std::shared_ptr< graph::CancelToken > | cancel_token |
| Optional cancel handle (v0.3+). | |
| json | extra_fields |
| Per-call body field bindings (issue #33, v0.8+). | |
| int | max_tokens = -1 |
| Maximum output tokens. -1 means provider default. | |
| std::vector< ChatMessage > | messages |
| Conversation history. | |
| std::string | model |
| Model name to use (e.g., "gpt-4o-mini"). | |
| float | temperature = 0.7f |
| Sampling temperature (0.0 = deterministic, 1.0 = creative). | |
| std::vector< ChatTool > | tools |
| Available tools the LLM may call. | |
Parameters for an LLM completion request.
Definition at line 57 of file provider.h.
| std::shared_ptr<graph::CancelToken> neograph::CompletionParams::cancel_token |
Optional cancel handle (v0.3+).
When set, async-native providers (OpenAIProvider, SchemaProvider) bind cancel_token->slot() to their ConnPool::async_post co_await, so a caller's cancel() aborts the in-flight HTTPS socket and stops billable LLM work mid-stream.
The engine populates this from RunConfig::cancel_token when a node calls ctx.provider->complete(params); user code that constructs CompletionParams directly may set it to share an abort across multiple completions.
Definition at line 77 of file provider.h.
| json neograph::CompletionParams::extra_fields |
Per-call body field bindings (issue #33, v0.8+).
Map of path → value overrides that the provider stamps into the outgoing request body for THIS call only. Companion to the schema-static request.extra_fields block that ships with every body — extra_fields here is the dynamic per-call side of the same hook.
For SchemaProvider: the schema author declares which paths are bindable per-call via "request.per_call_fields": [...]. Only listed paths are honoured; unknown paths are silently dropped (the schema, not the caller, owns the contract). This keeps the per-call surface declarative and matches how temperature_path / max_tokens_path already address specific paths.
Native Provider subclasses (e.g. OpenAIProvider) may choose to honour or ignore individual keys per their own documented surface — the field is generic, the contract is provider-defined.
Default: empty json. Same lifecycle shape as the existing schema-static request.extra_fields block.
Definition at line 115 of file provider.h.