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/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', ]); diff --git a/composer.json b/composer.json index 888715c..d0b04c9 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", @@ -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" 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 {} 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'])