morpheus.llm.nodes.retriever_node.RetrieverNode

class RetrieverNode(*, embedding, service, **similarity_search_kwargs)[source]

Bases: morpheus._lib.llm.LLMNodeBase

Node for retrieving data from a vector database based on embeddings.

Parameters
embedding

Callable function for generating vector embeddings. Default is None.

service

Vector database resource service for executing similarity searches.

similarity_search_kwargs

Additional keyword arguments for the similarity search.

Methods

execute(context) Execute the retrieval process based on the provided context.
get_input_names() Get the input names for the RetrieverNode.
async execute(context)[source]

Execute the retrieval process based on the provided context.

Parameters
context

Context object containing necessary information for execution.

Returns
LLMContext

Updated context object after the execution.

get_input_names()[source]

Get the input names for the RetrieverNode.

Returns
list[str]

List of input names for the RetrieverNode.

Previous morpheus.llm.nodes.retriever_node
Next morpheus.llm.services
© Copyright 2024, NVIDIA. Last updated on Apr 25, 2024.