diff --git a/composer.json b/composer.json index b0ff98e..44575fb 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "hyperf/config": "~3.0.0", "hyperf/di": "~3.0.0", "hyperf/guzzle": "~3.0.0", - "openai-php/client": "^0.7.0" + "openai-php/client": "^0.8.0" }, "autoload": { "psr-4": { diff --git a/src/ClientFactory.php b/src/ClientFactory.php index e76e2b1..cdf6799 100644 --- a/src/ClientFactory.php +++ b/src/ClientFactory.php @@ -39,6 +39,7 @@ public function __invoke(ContainerInterface $container) ->withBaseUri($baseUri) ->withApiKey($apiKey) ->withOrganization($organization) + ->withHttpHeader('OpenAI-Beta', 'assistants=v1') ->withHttpClient($httpClient) ->make(); }