1. Tasks
  2. Get Assistant Chat Log

Tasks

Get Assistant Chat Log

Fetches the chat log for a specific assistant's chat and stores it in the specified field in the stub data.

Basic usage

Task to fetch the chat log for a stub's chat or a specific assistant's chat.

loading...

Parameters

fieldname
required
string

Name of the field to save the result data to: my_chat_log


stubref
required
string

The stubref of the chat to retrieve the log for. This is typically ~~stub.stubref to collect the current stub’s chat log.


gptchattaskuuid
optional
string

The globally unique reference of the assistant chat log you want to collect. Not required if you did not specify this in the gpt_chat_task for the chat.

If you provided a specific gptchattaskuuid in the GPT Chat Task, it must be used here to retrieve that chat log.

See also: GPT Chat Task | gptchattaskuuid


chat_name
optional
string

If provided, this collects the chat log for the chat with the specified name.

To retrieve a chat log for a chat with no chat_name on stub 2023-10-03-KJHJ, use only the stubref. If the chat has a chat_name, it must also be provided here.

This should match the chat_name defined in the gpt_chat_task, if one was defined. If omitted, the default chat log is collected.

See also: GPT Chat Task | chat_name


include_text
optional
boolean

Includes a _text data point where the messages are separated by newlines.

Default: false


include_html
optional
boolean

Includes a _html data point where the messages are separated with <br> breaks.

Default: false


remove_system_messages
optional
boolean

Whether to remove system messages from the log.

Default: false


remove_function_calls
optional
boolean

Whether to remove function calls from the log.

Default: false


last_n_messages
optional
string

Returns only the last n messages. If false, returns all messages.

Default: false


first_n_messages
optional
string

Returns only the first n messages. If false, returns all messages.

Default: all


Result

loading...

Properties

fieldname

Name of the field created: my_chat_log


chat_log

An array of objects. Each object represents an entry in the chat log.