/** * Automates ChatGPT interactions using Puppeteer. Can send text questions or upload files to ChatGPT. * * @param {Object} [chatgptOptions={}] - Configuration options for ChatGPT automation. * @param {boolean} [chatgptOptions.headless=true] - Whether to run the browser in headless mode. * @param {string} [chatgptOptions.question] - Text question to send to ChatGPT. Either question or questionFile must be provided. * @param {string} [chatgptOptions.questionFile] - Path to a file to upload to ChatGPT. Either question or questionFile must be provided. * @param {string} [chatgptOptions.responseFile] - Path to save the response. Defaults to tmp/response.txt. * @returns {Promise} Resolves when the ChatGPT interaction is complete. Responses are logged to console and saved to specified file. * @throws {Error} Throws an error if neither question nor questionFile is provided. * * @example * // Send a text question * await runChatGpt({ * headless: false, * question: "What is the capital of France?" * }); * * @example * // Upload a file for analysis * await runChatGpt({ * headless: false, * questionFile: "./path/to/document.txt" * }); */ export function runChatGpt(chatgptOptions?: { headless?: boolean; question?: string; questionFile?: string; responseFile?: string; }): Promise;