NVIDIA Morpheus (24.06)
(Latest Version)

Template Class LLMLambdaNode

Base Type

template<typename ReturnT, typename ...ArgsT>
class LLMLambdaNode : public morpheus::llm::LLMNodeBase

Class template for a LLMNode created from a function that returns a Task.

Template Parameters
  • ReturnT – return type

  • ArgsT – arguments type

Public Types

using function_t = std::function<Task<ReturnT>(ArgsT...)>

Public Functions

inline LLMLambdaNode(std::vector<std::string> input_names, function_t function)

inline virtual std::vector<std::string> get_input_names() const override

Virtual method for implementing how task handler gets its input names.

Returns

std::vector<std::string>

inline virtual Task<std::shared_ptr<LLMContext>> execute(std::shared_ptr<LLMContext> context) override

Virtual method for implementing the execution of a node.

Parameters

context – context for node’s execution

Returns

Task>

Protected Attributes

std::vector<std::string> m_input_names

function_t m_function

Previous Class LLMEngine
Next Class LLMNode
© Copyright 2024, NVIDIA. Last updated on Jul 8, 2024.