Tasks
Get Assistant Chat Log
Fetches the Chat Log for a specific assistant's chat and stores it in the specified field in stub data.
Basic usage
Task to fetch the chat log for a stub's chat or a specific assistant's chat.
Parameters
required string
fieldname Name of the field to save the result data to : my_chat_log
required string
stubref The stubref of the chat to retrieve the log for. This would usually be ~~stub.stubref
to collect the current stubs chat log.
optional string
gptchattaskuuid The Globally Unique reference of the assistant chat log you would like to collect. Not required if you did not specify this in the gtp_chat_task
for the chat.
If you provided a specific gptchattaskuuid for the chat in the GPT Chat Task, that would be required to get that chat log.
See also: GPT Chat Task | gptchattaskuuid
optional string
chat_name Optional and has no default. This would collect the chat log for that chat with the name specified.
To find the chat log of a chat with no chat_name on stub 2023-10-03-KJHJ, just use the stubref. If the chat has a chat_name, that is also required.
This should match the chat name as defined in the gpt_chat_task
, if there was one defined.
If this is omitted, the default chat log will be collected.
See also: GPT Chat Task | chat_name
optional boolean
include_text Includes a _text data point where the messages are separated with newlines.
Default: false
optional boolean
include_html Includes a _html data point where the messages are separated with breaks.
Default: false
optional boolean
remove_system_messages Whether to remove the system message.
Default: false
optional boolean
remove_function_calls Whether to remove function calls from the log.
Default: false
optional string
last_n_messages Only return the last n messages. If false it returns all.
Default: false
optional string
first_n_messages Only return the first n messages. If false it returns all.
Default: all
Result
Properties
fieldname
Name of the field created : my_chat_log
chat_log
An array of objects. Each object is an entry in the chat log.