Struct LLMTask
Defined in File llm_task.hpp
-
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
- Returns
key – key of value to get from ‘task_dict’
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)