Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Headers is not defined issue #4

Open
medic27 opened this issue Apr 10, 2023 · 1 comment
Open

Headers is not defined issue #4

medic27 opened this issue Apr 10, 2023 · 1 comment

Comments

@medic27
Copy link

medic27 commented Apr 10, 2023

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
Copy link

talebi1 commented Apr 11, 2023

you might need to upgrade to node 18.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants