Closed cmeltt closed 1 year ago
Hi, I have this error Fatal error: Uncaught SymfonyComponentHttpClientExceptionTimeoutException: Idle timeout reached for "https://api.openai.com/v1/chat/completions".
The solution is to use this code
`use Symfony\Component\HttpClient\HttpClient; $client = HttpClient::create(['timeout' => 60]); // Set timeout to 60 seconds`
But I dont know where to place it. I m using symphony...
Thanks for the help !
@cmeltt, try doing this:
use Symfony\Component\HttpClient\HttpClient; $client = OpenAI::factory()->withApiKey($apiKey)->withClient(HttpClient::create([ 'timeout' => 60 ]));
Hi, I have this error Fatal error: Uncaught SymfonyComponentHttpClientExceptionTimeoutException: Idle timeout reached for "https://api.openai.com/v1/chat/completions".
The solution is to use this code
But I dont know where to place it. I m using symphony...
Thanks for the help !