Learn how to troubleshoot connection issues when using Polyglot.
// In your configuration file (config/llm.php) 'apiUrl' => 'https://api.openai.com/v1', // Correct URL
// Using custom HTTP client with proxy settings use Cognesy\Http\Config\HttpClientConfig;use Cognesy\Http\HttpClient; $config = new HttpClientConfig( requestTimeout: 30, connectTimeout: 10, additionalOptions: ['proxy' => 'http://proxy.example.com:8080'] ); $httpClient = new HttpClient('guzzle', $config); $inference = new Inference(); $inference->withHttpClient($httpClient);