chaingpt_get_chat_history
Retrieve chat history for a specific chat blob ID or across all chats using a unique identifier, with customizable limits, offsets, and sorting options.
Instructions
Get the chat history for a given chat blob id until the limit is reached retrieve saved chat history. By default, this will retrieve history entries associated with your API key. If you provide a specific sdkUniqueId, it will retrieve history entries associated with that chat blob id.
Args:
sdkUniqueId (str): The unique identifier for the chat.
limit (int, optional): The maximum number of chat history items to return. Default is 10.
offset (int, optional): The offset to start the chat history from. Default is 0.
sortBy (str, optional): The field to sort the chat history by. Default is 'createdAt'.
sortOrder (str, optional): The order to sort the chat history by. Default is 'ASC'.
Returns:
The chat history for the given chat blob id until the limit is reached.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | Yes | The maximum number of chat history items to return. Default is 10. | |
| offset | Yes | The offset to start the chat history from. Default is 0. | |
| sdkUniqueId | Yes | The unique id of the chat blob to get the history for. If not provided, it will return the chat history for all chat blobs until the limit is reached. | |
| sortBy | Yes | The field to sort the chat history by. Default is 'createdAt'. | |
| sortOrder | Yes | The order to sort the chat history by. Default is 'ASC'. |