Appends one or more ConversationMessage objects to the history of a specific thread.
Typically called at the end of an execution cycle to save the user query and the final AI response.
The ID of the thread to add messages to.
An array containing the ConversationMessage objects to add.
A promise that resolves when the messages have been successfully added to storage.
Retrieves messages from a specific thread's history, usually in reverse chronological order.
The ID of the thread whose history is needed.
Optionaloptions: MessageOptionsOptional parameters to control retrieval, such as limit (max number of messages) or beforeTimestamp (for pagination). See MessageOptions type.
A promise resolving to an array of ConversationMessage objects, ordered according to the implementation (typically newest first if not specified otherwise).
Interface for managing conversation history.