Chat tasks utilities
ChatInput
Subclass of IOModel.
__init__
Arguments:
prompt (str)
ChatOutput
Subclass of IOModel.
__init__
Arguments:
message (str)
ChatStreamOutput
Subclass of IOModel.
__init__
Arguments:
stream (Generator[str, None, None])
ChatAddContext
Add context to new messages. Subclass of Action. Type of Action[Dict[str, Any], Dict[str, Any]].
execute
Arguments:
input_data (Dict[str, Any]): Expected keys:
"messages" (Iterable[ChatCompletionMessageParam]): Input messages.
"context" (Iterable[ChatCompletionMessageParam]): Context messages.
Returns:
Dict[str, Any]: Expected keys:
"messages" (Iterable[ChatCompletionMessageParam]): Context messages and input messages.
ChatUpdateContext
Update chat context. Subclass of Action. Type of Action[Dict[str, Any], Dict[str, Any]].
execute
Arguments:
input_data (Dict[str, Any]): Expected keys:
"message" (str): Response message.
"context" (Iterable[ChatCompletionMessageParam]): Context.
Returns:
Dict[str, Any]: Expected keys:
"context" (Iterable[ChatCompletionMessageParam]): Updated context.
Last updated