NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
neograph::graph::LLMCallNode Class Reference

Node that makes LLM completion calls. More...

#include <node.h>

Inheritance diagram for neograph::graph::LLMCallNode:
[legend]
Collaboration diagram for neograph::graph::LLMCallNode:
[legend]

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< NodeOutputrun (NodeInput in) override
 v0.4 PR 9a: unified run override.
 

Detailed Description

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.

Definition at line 200 of file node.h.

Constructor & Destructor Documentation

◆ LLMCallNode()

neograph::graph::LLMCallNode::LLMCallNode ( const std::string &  name,
const NodeContext ctx 
)

Construct an LLM call node.

Parameters
nameUnique node name within the graph.
ctxNode context providing the LLM provider, tools, model, and instructions.

Member Function Documentation

◆ get_name()

std::string neograph::graph::LLMCallNode::get_name ( ) const
inlineoverridevirtual

Get the node's unique name within the graph.

Returns
Node name string.

Implements neograph::graph::GraphNode.

Definition at line 218 of file node.h.

◆ run()

asio::awaitable< NodeOutput > neograph::graph::LLMCallNode::run ( NodeInput  in)
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.


The documentation for this class was generated from the following file: