pub struct KnowledgeRetrievalNode { /* private fields */ }Expand description
Retrieves chunks from a KnowledgeBase service.
Output result is an array of {content, title, score, dataset_id, document_id, id, metadata} objects, ready for an LLM node’s context.
Implementations§
Source§impl KnowledgeRetrievalNode
impl KnowledgeRetrievalNode
Sourcepub fn from_doc(doc: &NodeDoc) -> Result<Self, ConfigError>
pub fn from_doc(doc: &NodeDoc) -> Result<Self, ConfigError>
Build from a node document.
Trait Implementations§
Source§impl Debug for KnowledgeRetrievalNode
impl Debug for KnowledgeRetrievalNode
Source§impl Node for KnowledgeRetrievalNode
impl Node for KnowledgeRetrievalNode
Source§fn run(&self, ctx: NodeContext) -> BoxFuture<'_, NodeResult>
fn run(&self, ctx: NodeContext) -> BoxFuture<'_, NodeResult>
Execute the node. Dropping the returned future cancels the node.
Source§fn inputs(&self) -> Vec<Selector>
fn inputs(&self) -> Vec<Selector>
Selectors this node reads.
crate::graph::Graph::build rejects selectors
whose namespace is neither a node id nor sys / env / conversation
(catching typos at load time) and warns about references into other
container bodies. Return every selector the node may read, including
placeholders inside templates.Auto Trait Implementations§
impl Forget for KnowledgeRetrievalNode
impl Freeze for KnowledgeRetrievalNode
impl Move for KnowledgeRetrievalNode
impl RefUnwindSafe for KnowledgeRetrievalNode
impl Send for KnowledgeRetrievalNode
impl Sync for KnowledgeRetrievalNode
impl Unpin for KnowledgeRetrievalNode
impl UnsafeUnpin for KnowledgeRetrievalNode
impl UnwindSafe for KnowledgeRetrievalNode
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more