--- title: "import ChatGPT history()" slug: "ai-import-chat-history" updated: 2026-08-10T06:04:33Z published: 2026-08-10T06:04:33Z canonical: "docs.lobstersoftware.com/ai-import-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. # import ChatGPT history() With this function, a previously exported chat history can be imported. If the import was successful, the function returns "true". If no valid chat history was imported or no valid session key was specified, the return value is "false". ## 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). | | b | The chat history data to import. **NOTE:** See function [export ChatGPT history()](/v1/docs/en/ai-dump-chat-history). |