|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
Node that makes LLM completion calls. More...
#include <node.h>
Public Member Functions | |
| std::string | get_name () const override |
| Get the node's unique name within the graph. | |
| LLMCallNode (const std::string &name, const NodeContext &ctx) | |
| Construct an LLM call node. | |
| asio::awaitable< NodeOutput > | run (NodeInput in) override |
v0.4 PR 9a: unified run override. | |
Node that makes LLM completion calls.
Reads the "messages" channel, builds completion parameters, calls the LLM provider, and writes the response back to "messages". Mirrors the Agent::run() LLM call logic.
| neograph::graph::LLMCallNode::LLMCallNode | ( | const std::string & | name, |
| const NodeContext & | ctx | ||
| ) |
Construct an LLM call node.
| name | Unique node name within the graph. |
| ctx | Node context providing the LLM provider, tools, model, and instructions. |
|
inlineoverridevirtual |
Get the node's unique name within the graph.
Implements neograph::graph::GraphNode.
|
overridevirtual |
v0.4 PR 9a: unified run override.
Builds completion params, calls provider_->complete_async (or complete_stream_async when in.stream_cb is non-null and bridges per-token events to GraphEvent), writes the assistant message to the messages channel. Passes in.ctx.cancel_token directly into params.cancel_token so cancellation reaches the LLM HTTP socket without the legacy thread-local smuggling.
Implements neograph::graph::GraphNode.