Welcome to Portkey Forum

Updated 7 months ago

Changing the baseURL to http://localhost:8787 will work

Hey Harsh, changing the baseURL to http://localhost:8787 will work
H
V
7 comments
Plain Text
/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
Ah that’s my bad, the baseURL will be http://localhost:8787/v1
Add a reply
Sign up and join the conversation on Discord