From ed1019c563d7092d6522358dfc2c0cdfaf3c77f7 Mon Sep 17 00:00:00 2001 From: Rachid Laasri Date: Wed, 12 Jun 2024 19:01:21 +0100 Subject: [PATCH] Switch from legacy to latest version of Assistants (#18) --- src/ChatBotServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ChatBotServiceProvider.php b/src/ChatBotServiceProvider.php index 3a175cf..4185335 100644 --- a/src/ChatBotServiceProvider.php +++ b/src/ChatBotServiceProvider.php @@ -55,7 +55,7 @@ private function registerServices(): void $openAI = OpenAIFactory::factory() ->withApiKey($apiKey) ->withOrganization($organization) - ->withHttpHeader('OpenAI-Beta', 'assistants=v1') + ->withHttpHeader('OpenAI-Beta', 'assistants=v2') ->withHttpClient(new \GuzzleHttp\Client(['timeout' => config('chatbot.request_timeout', 30)])) ->make();