RafalWilinski / telegram-chatgpt-concierge-bot

Interact with OpenAI's ChatGPT via Telegram and Voice.
https://chatwithcloud.ai
1.13k stars 110 forks source link

Headers is not defined issue #4

Open medic27 opened 1 year ago

medic27 commented 1 year ago

I'm getting the following issue (maybe I'm missing something):

[WARN] Importing from 'langchain/chat_models' is deprecated. Import from eg. 'langchain/chat_models/openai' instead. See https://js.langchain.com/docs/getting-started/install#updating-from-0052 for upgrade instructions. Healthcheck server listening on port undefined Bot started Input: Help Entering new agent_executor chain... Unhandled error while processing { update_id: 858617076, message: { message_id: 3, from: { id: 5402165287, is_bot: false, first_name: '', last_name: '', username: '', language_code: 'en' }, chat: { id: 5402165287, first_name: '', last_name: '', username: '', type: 'private' }, date: 1681169988, text: 'Help' } } (node:28132) UnhandledPromiseRejectionWarning: ReferenceError: Headers is not defined at createRequest (C:\Users*\telegram-chatgpt-concierge-bot\node_modules\langchain\dist\util\axios-fetch-adapter.cjs:239:21) at fetchAdapter (C:\Users*\telegram-chatgpt-concierge-bot\node_modules\langchain\dist\util\axios-fetch-adapter.cjs:170:21) at dispatchRequest (C:\Users*\telegram-chatgpt-concierge-bot\node_modules\openai\node_modules\axios\lib\core\dispatchRequest.js:58:10) at Axios.request (C:\Users*\telegram-chatgpt-concierge-bot\node_modules\openai\node_modules\axios\lib\core\Axios.js:108:15) at Function.wrap [as request] (C:\Users\Jc\telegram-chatgpt-concierge-bot\node_modules\openai\node_modules\axios\lib\helpers\bind.js:9:15) at C:\Users*\telegram-chatgpt-concierge-bot\node_modules\openai\dist\common.js:149:22 at C:\Users*\telegram-chatgpt-concierge-bot\node_modules\openai\dist\api.js:1738:133 at async RetryOperation._fn (C:\Users*\telegram-chatgpt-concierge-bot\node_modules\p-retry\index.js:50:12) (Use node --trace-warnings ... to show where the warning was created) (node:28132) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 13) (node:28132) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

talebi1 commented 1 year ago

you might need to upgrade to node 18.