FlowTest icon indicating copy to clipboard operation
FlowTest copied to clipboard

Proxy TIMEOUT

Open changz1115 opened this issue 1 year ago • 1 comments

Hello FlowTestAI Team,

My notebook network need setup http_proxy and https_proxy to access openai, How to setup proxy in FlowTestAI to fix the following connect timeout issue?

(Use electron --trace-warnings ... to show where the warning was created) Error fetching package.json: AggregateError at internalConnectMultiple (node:net:1114:18) at internalConnectMultiple (node:net:1177:5) at Timeout.internalConnectMultipleTimeout (node:net:1687:3) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { code: 'ETIMEDOUT', [errors]: [ Error: connect ETIMEDOUT 185.199.108.133:443 at createConnectionError (node:net:1634:14) at Timeout.internalConnectMultipleTimeout (node:net:1685:38) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -110, code: 'ETIMEDOUT', syscall: 'connect', address: '185.199.108.133', port: 443 }, Error: connect ENETUNREACH 2606:50c0:8003::154:443 - Local (:::0) at internalConnectMultiple (node:net:1176:40) at Timeout.internalConnectMultipleTimeout (node:net:1687:3) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -101, code: 'ENETUNREACH', syscall: 'connect', address: '2606:50c0:8003::154', port: 443 }, Error: connect ETIMEDOUT 185.199.109.133:443 at createConnectionError (node:net:1634:14) at Timeout.internalConnectMultipleTimeout (node:net:1685:38) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -110, code: 'ETIMEDOUT', syscall: 'connect', address: '185.199.109.133', port: 443 }, Error: connect ENETUNREACH 2606:50c0:8001::154:443 - Local (:::0) at internalConnectMultiple (node:net:1176:40) at Timeout.internalConnectMultipleTimeout (node:net:1687:3) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -101, code: 'ENETUNREACH', syscall: 'connect', address: '2606:50c0:8001::154', port: 443 }, Error: connect ETIMEDOUT 185.199.110.133:443 at createConnectionError (node:net:1634:14) at Timeout.internalConnectMultipleTimeout (node:net:1685:38) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -110, code: 'ETIMEDOUT', syscall: 'connect', address: '185.199.110.133', port: 443 }, Error: connect ENETUNREACH 2606:50c0:8000::154:443 - Local (:::0) at internalConnectMultiple (node:net:1176:40) at Timeout.internalConnectMultipleTimeout (node:net:1687:3) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -101, code: 'ENETUNREACH', syscall: 'connect', address: '2606:50c0:8000::154', port: 443 }, Error: connect ETIMEDOUT 185.199.111.133:443 at createConnectionError (node:net:1634:14) at Timeout.internalConnectMultipleTimeout (node:net:1685:38) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -110, code: 'ETIMEDOUT', syscall: 'connect', address: '185.199.111.133', port: 443 }, Error: connect ENETUNREACH 2606:50c0:8002::154:443 - Local (:::0) at internalConnectMultiple (node:net:1176:40) at Timeout.internalConnectMultipleTimeout (node:net:1687:3) at listOnTimeout (node:internal/timers:575:11) at process.processTimers (node:internal/timers:514:7) { errno: -101, code: 'ENETUNREACH', syscall: 'connect', address: '2606:50c0:8002::154', port: 443 } ] }

look forward for your reply.

Chang Tim

changz1115 avatar Aug 14 '24 01:08 changz1115

hey @changz1115 i completely missed seeing this. would you mind explaining the issue in more detail? is it that you can't directly access openai endpoints and need to access them via proxy?

jsajal avatar Aug 20 '24 04:08 jsajal

hi @jsajal thx for reply

yes, i need use a proxy , already setup https_proxy / http_proxy / no_proxy in /etc/environment. can curl openai api, so should setup proxy in FlowTest somewhere?

changz1115 avatar Aug 23 '24 00:08 changz1115

Hey @changz1115 we currently don't have support for proxy, I will have to see how to proxy openai calls

Here is the code where I actually use openai sdk in case you can help us given I can't reproduce it locally. Any contribution to the repo is much appreciated

https://github.com/FlowTestAI/FlowTest/blob/main/packages%2Fflowtest-electron%2Fsrc%2Fai%2Fmodels%2Fopenai.js

Btw when you say you can curl openai api , what is the endpoint url do you hit?

jsajal avatar Aug 28 '24 03:08 jsajal

hi @jsajal

Sorry for reply so late.... for curl endpoint url is https://openai.com/chatgpt/mac/.

let me try to check the source, i remember there is a base_url can use....

changz1115 avatar Sep 09 '24 08:09 changz1115