getAssistantHistory

declare function getAssistantHistory(clientId: string): Promise<IModelMessage<object>[]>;

Retrieves the assistant's history entries for a given client session.

This function fetches the raw history for a specified client using getRawHistory and filters it to include only entries where the role is "assistant". It is wrapped in beginContext for a clean execution environment and logs the operation if enabled via GLOBAL_CONFIG. The result is an array of history objects representing the assistant's contributions in the session.

Parameter Description
clientId The unique identifier of the client session whose assistant history is to be retrieved.