Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[0.8.x] Add Assistant API #70

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ 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.8.0-beta.1 (2023-11-13)
### Changed
- Changed underlying `openai/client` package version from 0.7.8 to v0.8.0-beta.1

## v0.7.8 (2023-11-07)
### Changed
- Changed underlying `openai/client` package version from 0.7.5 to 0.7.8
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": "^8.1.0",
"guzzlehttp/guzzle": "^7.7.0",
"laravel/framework": "^9.46.0|^10.14.1",
"openai-php/client": "^0.7.8"
"openai-php/client": "v0.8.0-beta.1"
},
"require-dev": {
"laravel/pint": "^1.10.3",
Expand Down
2 changes: 2 additions & 0 deletions src/Facades/OpenAI.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use OpenAI\Responses\StreamResponse;

/**
* @method static \OpenAI\Resources\Assistants assistants()
* @method static \OpenAI\Resources\Audio audio()
* @method static \OpenAI\Resources\Chat chat()
* @method static \OpenAI\Resources\Completions completions()
Expand All @@ -20,6 +21,7 @@
* @method static \OpenAI\Resources\Images images()
* @method static \OpenAI\Resources\Models models()
* @method static \OpenAI\Resources\Moderations moderations()
* @method static \OpenAI\Resources\Threads threads()
*/
final class OpenAI extends Facade
{
Expand Down
1 change: 1 addition & 0 deletions src/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function register(): void
return OpenAI::factory()
->withApiKey($apiKey)
->withOrganization($organization)
->withHttpHeader('OpenAI-Beta', 'assistants=v1')
->withHttpClient(new \GuzzleHttp\Client(['timeout' => config('openai.request_timeout', 30)]))
->make();
});
Expand Down
Loading