NVIDIA Morpheus (24.06)
(Latest Version)

Struct LLMTask

struct LLMTask

Holds information about LLM task. This information is extracted by LLMEngine from input control message and saved to the context for use by task handler(s).

Public Functions

LLMTask()

Construct a new LLMTask object.

LLMTask(std::string task_type, nlohmann::json task_dict)

Construct a new LLMTask object.

Parameters
  • task_type

  • task_dict

~LLMTask()

Destroy the LLMTask object.

size_t size() const

Get size of ‘task_dict’.

Returns

size_t

const nlohmann::json &get(const std::string &key) const

Get value in ‘task_dict` corresponding to given key.

Parameters

key – key of value to get from ‘task_dict’

Returns

const nlohmann::json&

void set(const std::string &key, nlohmann::json &&value)

Set or update item in ‘task_dict’.

Parameters
  • key – key of value in ‘task_dict’ to set

  • value – new value

Public Members

std::string task_type

task type

nlohmann::json task_dict

dictionary of task-related items used by task handler(s)

Previous Struct LLMContextState
Next Struct UserInputMapping
© Copyright 2024, NVIDIA. Last updated on Jul 8, 2024.