NVIDIA Morpheus (24.06)
(Latest Version)

morpheus.llm.nodes.extracter_node.ExtracterNode

class ExtracterNode[source]

Bases: morpheus._lib.llm.LLMNodeBase

Extracts fields from the DataFrame contained by the message attached to the LLMContext and copies them directly to the context.

The list of fields to be extracted is provided by the task’s input_keys attached to the LLMContext.

Methods

execute(self, context) Execute the current node with the given context instance.
get_input_names(self) Get the input names for the node.
async execute(self: morpheus._lib.llm.LLMNodeBase, context: morpheus._lib.llm.LLMContext)Awaitable[morpheus._lib.llm.LLMContext][source]

Execute the current node with the given context instance.

All inputs for the given node should be fetched from the context, typically by calling either context.get_inputs to fetch all inputs as a dict, or context.get_input to fetch a specific input.

Similarly the output of the node is written to the context using context.set_output.

Parameters
context : morpheus._lib.llm.LLMContext

Context instance to use for the execution

get_input_names(self: morpheus._lib.llm.LLMNodeBase) → List[str][source]

Get the input names for the node.

Returns
list[str]

The input names for the node

Previous morpheus.llm.nodes.extracter_node
Next morpheus.llm.nodes.extracter_node.ManualExtracterNode
© Copyright 2024, NVIDIA. Last updated on Jul 8, 2024.