You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PS C:\Users\Lenovo\Desktop> node
Welcome to Node.js v20.11.1.
Type ".help" for more information.
> await fetch('https://api.openai.com/v1/chat/completions')
Uncaught TypeError: fetch failed
at node:internal/deps/undici/undici:12345:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async REPL1:1:33 {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:7492:28)
at node:internal/deps/undici/undici:7448:50
at Immediate._onImmediate (node:internal/deps/undici/undici:7478:37)
at process.processImmediate (node:internal/timers:478:21)
at process.topLevelDomainCallback (node:domain:160:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
> await fetch('https://cn.bing.com')
Response {
[Symbol(realm)]: null,
[Symbol(state)]: Proxy [
{
aborted: false,
rangeRequested: false,
timingAllowPassed: true,
requestIncludesCredentials: true,
type: 'default',
status: 200,
timingInfo: [Object],
cacheState: '',
statusText: 'OK',
headersList: [HeadersList],
urlList: [Array],
body: [Object]
},
{ get: [Function: get], set: [Function: set] }
]...
But I can access openai api from browser.
I can use openai python sdk to access openai api.
And I tried node v18 all of the version have the problem.
How often does it reproduce? Is there a required condition?
100% reproduce.
What is the expected behavior? Why is that the expected behavior?
No response
What do you see instead?
await fetch('https://api.openai.com/v1/chat/completions')
Uncaught TypeError: fetch failed
at node:internal/deps/undici/undici:12345:11
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async REPL1:1:33 {
cause: ConnectTimeoutError: Connect Timeout Error
at onConnectTimeout (node:internal/deps/undici/undici:7492:28)
at node:internal/deps/undici/undici:7448:50
at Immediate._onImmediate (node:internal/deps/undici/undici:7478:37)
at process.processImmediate (node:internal/timers:478:21)
at process.topLevelDomainCallback (node:domain:160:15)
at process.callbackTrampoline (node:internal/async_hooks:128:24) {
code: 'UND_ERR_CONNECT_TIMEOUT'
}
}
Additional information
No response
The text was updated successfully, but these errors were encountered:
Version
20.11.1
Platform
Microsoft Windows NT 10.0.22631.0
Subsystem
No response
What steps will reproduce the bug?
But I can access openai api from browser.
I can use openai python sdk to access openai api.
And I tried node v18 all of the version have the problem.
How often does it reproduce? Is there a required condition?
100% reproduce.
What is the expected behavior? Why is that the expected behavior?
No response
What do you see instead?
Additional information
No response
The text was updated successfully, but these errors were encountered: