Skip to content

Commit e2cce34

Browse files
authored
Avoid naming confusion of variables
Make http $client different from openai $client variable names
1 parent 288325a commit e2cce34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ $client = OpenAI::factory()
8484
->withOrganization('your-organization') // default: null
8585
->withProject('Your Project') // default: null
8686
->withBaseUri('openai.example.com/v1') // default: api.openai.com/v1
87-
->withHttpClient($client = new \GuzzleHttp\Client([])) // default: HTTP client found using PSR-18 HTTP Client Discovery
87+
->withHttpClient($httpClient = new \GuzzleHttp\Client([])) // default: HTTP client found using PSR-18 HTTP Client Discovery
8888
->withHttpHeader('X-My-Header', 'foo')
8989
->withQueryParam('my-param', 'bar')
90-
->withStreamHandler(fn (RequestInterface $request): ResponseInterface => $client->send($request, [
90+
->withStreamHandler(fn (RequestInterface $request): ResponseInterface => $httpClient->send($request, [
9191
'stream' => true // Allows to provide a custom stream handler for the http client.
9292
]))
9393
->make();

0 commit comments

Comments
 (0)