|
NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
|
Node that classifies user intent via LLM and routes execution. More...
#include <node.h>
Public Member Functions | |
| std::string | get_name () const override |
| Get the node's unique name within the graph. | |
| IntentClassifierNode (const std::string &name, const NodeContext &ctx, const std::string &prompt, std::vector< std::string > valid_routes) | |
| Construct an intent classifier node. | |
| asio::awaitable< NodeOutput > | run (NodeInput in) override |
v0.4 PR 9a: unified run — calls the LLM with the classification prompt, parses the result against valid_routes, writes the chosen route to __route__. | |
Node that classifies user intent via LLM and routes execution.
Calls the LLM with a classification prompt, writes the detected intent to the "__route__" channel. Used with the "route_channel" condition for dynamic routing based on user intent.
| neograph::graph::IntentClassifierNode::IntentClassifierNode | ( | const std::string & | name, |
| const NodeContext & | ctx, | ||
| const std::string & | prompt, | ||
| std::vector< std::string > | valid_routes | ||
| ) |
Construct an intent classifier node.
| name | Unique node name within the graph. |
| ctx | Node context providing the LLM provider. |
| prompt | Classification prompt template sent to the LLM. |
| valid_routes | List of valid intent route names the LLM can return. |
|
inlineoverridevirtual |
Get the node's unique name within the graph.
Implements neograph::graph::GraphNode.
|
overridevirtual |
v0.4 PR 9a: unified run — calls the LLM with the classification prompt, parses the result against valid_routes, writes the chosen route to __route__.
Streams per-token events when in.stream_cb is non-null.
Implements neograph::graph::GraphNode.