File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed
Filter options
Expand file tree Collapse file tree 3 files changed +4
-1
lines changed
Original file line number Diff line number Diff line change 13
13
"php" : " ^8.1.0" ,
14
14
"guzzlehttp/guzzle" : " ^7.7.0" ,
15
15
"laravel/framework" : " ^9.46.0|^10.14.1" ,
16
- "openai-php/client" : " ^ v0.8.0"
16
+ "openai-php/client" : " dev-add-events as v0.8.0"
17
17
},
18
18
"require-dev" : {
19
19
"laravel/pint" : " ^1.13.6" ,
Original file line number Diff line number Diff line change 7
7
use Illuminate \Support \Facades \Facade ;
8
8
use OpenAI \Contracts \ResponseContract ;
9
9
use OpenAI \Laravel \Testing \OpenAIFake ;
10
+ use OpenAI \Resources \Assistants ;
10
11
use OpenAI \Responses \StreamResponse ;
11
12
12
13
/**
Original file line number Diff line number Diff line change 4
4
5
5
namespace OpenAI \Laravel ;
6
6
7
+ use Illuminate \Contracts \Events \Dispatcher as DispatcherContract ;
7
8
use Illuminate \Contracts \Support \DeferrableProvider ;
8
9
use Illuminate \Support \ServiceProvider as BaseServiceProvider ;
9
10
use OpenAI ;
@@ -35,6 +36,7 @@ public function register(): void
35
36
->withOrganization ($ organization )
36
37
->withHttpHeader ('OpenAI-Beta ' , 'assistants=v1 ' )
37
38
->withHttpClient (new \GuzzleHttp \Client (['timeout ' => config ('openai.request_timeout ' , 30 )]))
39
+ ->withEventDispatcher (resolve (DispatcherContract::class)) // @phpstan-ignore-line
38
40
->make ();
39
41
});
40
42
You can’t perform that action at this time.
0 commit comments