From d6adf4d35a9ed348f20e4da0f4d858ab367f2680 Mon Sep 17 00:00:00 2001 From: Deeka Wong Date: Thu, 23 Nov 2023 22:39:41 +0800 Subject: [PATCH] Bumps openai-client to `^0.8.0` (#461) Co-authored-by: Deeka Wong <8337659+huangdijia@users.noreply.github.com> --- composer.json | 2 +- src/ClientFactory.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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(); }