feat: initial support for RAG nodes in the graph execution system

This commit is contained in:
2026-05-15 14:11:23 -06:00
parent d47371f5a0
commit c486685489
10 changed files with 454 additions and 47 deletions
+7
View File
@@ -10,6 +10,7 @@ use super::agent::AgentNodeExecutor;
use super::llm::LlmNodeExecutor;
use super::logging::GraphLogger;
use super::parser::GraphParser;
use super::rag::RagNodeExecutor;
use super::script::ScriptExecutor;
use super::state::StateManager;
use super::types::{EndNode, Graph, Node, NodeType};
@@ -204,6 +205,12 @@ async fn step(
let next = LlmNodeExecutor::execute(llm_node, node.next.as_deref(), state, ctx).await?;
Ok(StepResult::Continue(next))
}
NodeType::Rag(rag_node) => {
let next =
RagNodeExecutor::execute(rag_node, current, node.next.as_deref(), state, ctx)
.await?;
Ok(StepResult::Continue(next))
}
NodeType::End(end_node) => Ok(StepResult::End(resolve_end_output(end_node, state))),
}
}