morpheus_llm.llm.task_handlers.simple_task_handler.SimpleTaskHandler#
- class SimpleTaskHandler(output_columns=None)[source]#
Bases:
LLMTaskHandlerCopies fields from an
LLMContextto columns in the DataFrame contained in theControlMessagepayload.- Parameters:
- output_columnslist[str], optional
The list of columns to copy from the
LLMContextinstance to the DataFrame. IfNone, defaults to["response"].
Methods
get_input_names(self)Get the input names for the task handler.
try_handle(self, context)Convert the given
contextinto a list ofControlMessageinstances.- get_input_names( ) list[str][source]#
Get the input names for the task handler.
- Returns:
- list[str]
The input names for the task handler.
- async try_handle(
- self: morpheus_llm._lib.llm.LLMTaskHandler,
- context: morpheus_llm._lib.llm.LLMContext,
Convert the given
contextinto a list ofControlMessageinstances.- Parameters:
- context
morpheus._lib.llm.LLMContext Context instance to use for the execution
- context
- Returns:
- Task[Optional[list[ControlMessage]]]