client
client copied to clipboard
fix: set false GuzzleClient ssl laravel local developer
During local development laravel throws ssl error. So I chose to add via service provider the verify = false option when instantiating the GuzzleClient that way it will not verify the ssl during local development.
Hi @fabiovige
Thank you for your suggestion.
Because we do have other requests to modify the client in one or the other way (#39 #46 #30) I think it's better to have a generic way to modify the client options instead of just adding an extra parameter for this specific purpose.
But we will take your requirement into consideration for the further development. If you find time to look into the other issues, a more generic solution is very welcome.
Claro,
Irei analisar com mais calma.
Obrigado pelo retorno.
@fabiovige Thank you.
And thanks to OpenAI is was able to understand your reply 😅
Translate to english: "Claro,
Irei analisar com mais calma.
Obrigado pelo retorno."
Sure, I will take a closer look. Thank you for the feedback.
You can now use the newly introduce factory to customize the guzzle client:
$client = OpenAI::factory()
->withApiKey('<your-api-key>')
->withHttpClient(new \GuzzleHttp\Client(['verify' => false]))
->make();