Export the current conversation history to a JSON-formatted file.
Returns a value of true if the conversation history has been exported; otherwise returns
false.
The exported history includes both client messages and model responses stored in the current session history. It cannot be used if the conversation history has been disabled by setting the HistorySize property to zero.
The exported file uses UTF-8 encoded JSON text and is intended to be human-readable. Applications should not depend on the exact formatting or internal structure of the file because future versions of the class may include additional metadata or fields. To help prevent data loss, the method writes the exported history to a temporary file and only replaces the destination file after the export operation has completed successfully. If the export fails, any existing file specified by the fileName parameter is left unchanged.
Important: The conversation history may contain sensitive or private information. Applications should take reasonable precautions to protect exported history files, such as limiting access permissions or encrypting the exported file. Applications which allow users to export conversation history should consider informing users that the exported file may contain private information.