--- title: "export ChatGPT history()" slug: "ai-dump-chat-history" updated: 2026-08-10T06:01:52Z published: 2026-08-10T06:01:52Z canonical: "docs.lobstersoftware.com/ai-dump-chat-history" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.lobstersoftware.com/llms.txt > Use this file to discover all available pages before exploring further. # export ChatGPT history() This function returns the chat history for a chat session ***a***. If an empty chat history is found for an existing chat session, the return value is an empty string. If no session is found for the specified session key ***a***, the return value is an empty string with the empty flag set. ## Parameters | Parameter | Description | | --- | --- | | a | (optional) Chat session key. **NOTE:** If no specific session key is set, the internal session key is used. See functions [setup OpenAI ChatGPT()](/v1/docs/en/ai-open-ai-chat-gpt-setup) and [setup Azure ChatGPT()](/v1/docs/en/ai-azure-chat-gpt-setup). |