Open ovchinnikovndre1 opened 8 months ago
@ovchinnikovndre1 Please provide more information. At least the exception message and stack trace.
+1 pls Sometimes we need set HTTP/SOCKS5 proxy to access api.openai.com
yes this feature would be useful
Hi. How do I add proxy support? I tried it like this : $proxies = [ 'http' => 'http://login:pass@ip:port', ];
This works for me:
$client = \OpenAI::factory()
->withApiKey($apiKey)
->withHttpClient($client = new \GuzzleHttp\Client([
'proxy' => 'http://my.proxy.url:80',
]))
->make();
For socks5 working like this
$client = \OpenAI::factory()
->withApiKey($apiKey)
->withHttpClient($client = new \GuzzleHttp\Client([
'proxy' => 'socks5://USER:PASSWORD@ip:port'
]))
->make();
Hi. How do I add proxy support? I tried it like this : $proxies = [ 'http' => 'http://login:pass@ip:port', ];
But I still get 500 error /var/www/vendor/openai-php/client/src/Resources/Chat.php ", line: 32