/Users/harshwork/code/ai-browser-node/node_modules/openai/core.js:292
throw new error_1.APIConnectionError({ cause: response });
^
APIConnectionError: Connection error.
at OpenAI.makeRequest (/Users/harshwork/code/ai-browser-node/node_modules/openai/core.js:292:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async main (/Users/harshwork/code/ai-browser-node/form_filler/llm_call_test.js:16:26) {
status: undefined,
headers: undefined,
request_id: undefined,
error: undefined,
code: undefined,
param: undefined,
type: undefined,
cause: FetchError: request to http://localhost:8787/chat/completions failed, reason: connect ECONNREFUSED ::1:8787
at ClientRequest.<anonymous> (/Users/harshwork/code/ai-browser-node/node_modules/node-fetch/lib/index.js:1501:11)
at ClientRequest.emit (node:events:514:28)
at Socket.socketErrorListener (node:_http_client:501:9)
at Socket.emit (node:events:526:35)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
type: 'system',
errno: 'ECONNREFUSED',
code: 'ECONNREFUSED'
}
}
Node.js v18.17.1