From 26f9b8b11af47f9dd5567e52ff2f44cbebd4e3df Mon Sep 17 00:00:00 2001 From: Dylan Delobel Date: Mon, 15 Jan 2024 18:58:47 +0100 Subject: [PATCH 1/4] Update deprecated model --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8171dd2..8434328 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Finally, you may use the `openai` service to access the OpenAI API: ```php $result = $container->get('openai')->completions()->create([ - 'model' => 'text-davinci-003', + 'model' => 'gpt-3.5-turbo-instruct', 'prompt' => 'PHP is', ]); From 4aaf1347266cbf0277325d8533a77f8a4578b233 Mon Sep 17 00:00:00 2001 From: slim-dg9 <122024497+slim-dg9@users.noreply.github.com> Date: Fri, 7 Jun 2024 15:51:37 +0200 Subject: [PATCH 2/4] Assistant v2 update --- composer.json | 2 +- src/Resources/config/services.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 888715c..c2712a1 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "require": { "php": "^8.1.0", "nyholm/psr7": "^1.8.1", - "openai-php/client": "^0.8.0", + "openai-php/client": "^0.10", "psr/http-client": "^1.0.3", "psr/http-factory": "^1.0.2", "symfony/config": "^5.4|^6.3|^7.0", diff --git a/src/Resources/config/services.php b/src/Resources/config/services.php index 42ad5b5..5f00864 100644 --- a/src/Resources/config/services.php +++ b/src/Resources/config/services.php @@ -17,7 +17,7 @@ ->set(Factory::class) ->factory([OpenAI::class, 'factory']) ->call('withHttpClient', [service('openai.http_client')]) - ->call('withHttpHeader', ['OpenAI-Beta', 'assistants=v1']) + ->call('withHttpHeader', ['OpenAI-Beta', 'assistants=v2']) ->set(Client::class) ->factory([service(Factory::class), 'make']) From 3e9972358af998d60c4eb1fd4fdf4926643ebb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 19 Jun 2024 13:41:30 +0200 Subject: [PATCH 3/4] Fix CS --- src/OpenAIBundle.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/OpenAIBundle.php b/src/OpenAIBundle.php index 4a58def..c14715b 100644 --- a/src/OpenAIBundle.php +++ b/src/OpenAIBundle.php @@ -6,6 +6,4 @@ use Symfony\Component\HttpKernel\Bundle\Bundle; -final class OpenAIBundle extends Bundle -{ -} +final class OpenAIBundle extends Bundle {} From 7eee58b69714a99573670ba365704fc2621220ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 19 Jun 2024 13:53:03 +0200 Subject: [PATCH 4/4] Prepare v0.10.0 (#20) --- CHANGELOG.md | 5 +++++ composer.json | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c22efa5..82286bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## v0.10.0 (2024-06-19) +### Changed +- Specify header `OpenAI-Beta: assistants=v2` +- Changed underlying `openai/client` package version to 0.10.0 + ## v0.7.10 (2023-11-14) ### Changed - Changed underlying `openai/client` package version to 0.7.10 diff --git a/composer.json b/composer.json index c2712a1..d0b04c9 100644 --- a/composer.json +++ b/composer.json @@ -26,7 +26,7 @@ "symfony/http-kernel": "^5.4|^6.3|^7.0.1" }, "require-dev": { - "laravel/pint": "^1.13.6", + "laravel/pint": "^1.16.1", "phpstan/phpstan": "^1.10.47", "rector/rector": "^0.14.8", "symfony/phpunit-bridge": "^5.4|^6.3|^7.0.1"