Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b25394f

Browse filesBrowse files
committed
WIP: add pulse card
1 parent e5b4554 commit b25394f
Copy full SHA for b25394f

File tree

Expand file treeCollapse file tree

3 files changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+4
-1
lines changed

‎composer.json

Copy file name to clipboardExpand all lines: composer.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"php": "^8.1.0",
1414
"guzzlehttp/guzzle": "^7.7.0",
1515
"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"
1717
},
1818
"require-dev": {
1919
"laravel/pint": "^1.13.6",

‎src/Facades/OpenAI.php

Copy file name to clipboardExpand all lines: src/Facades/OpenAI.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Illuminate\Support\Facades\Facade;
88
use OpenAI\Contracts\ResponseContract;
99
use OpenAI\Laravel\Testing\OpenAIFake;
10+
use OpenAI\Resources\Assistants;
1011
use OpenAI\Responses\StreamResponse;
1112

1213
/**

‎src/ServiceProvider.php

Copy file name to clipboardExpand all lines: src/ServiceProvider.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace OpenAI\Laravel;
66

7+
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract;
78
use Illuminate\Contracts\Support\DeferrableProvider;
89
use Illuminate\Support\ServiceProvider as BaseServiceProvider;
910
use OpenAI;
@@ -35,6 +36,7 @@ public function register(): void
3536
->withOrganization($organization)
3637
->withHttpHeader('OpenAI-Beta', 'assistants=v1')
3738
->withHttpClient(new \GuzzleHttp\Client(['timeout' => config('openai.request_timeout', 30)]))
39+
->withEventDispatcher(resolve(DispatcherContract::class)) // @phpstan-ignore-line
3840
->make();
3941
});
4042

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.