File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 17
17
expect ($ openAI )->toBeInstanceOf (Client::class);
18
18
});
19
19
20
+ it ('sets project when provided ' , function () {
21
+ $ openAI = OpenAI::client ('foo ' , 'nunomaduro ' , 'openai_proj ' );
22
+
23
+ expect ($ openAI )->toBeInstanceOf (Client::class);
24
+ });
25
+
20
26
it ('may create a client via factory ' , function () {
21
27
$ openAI = OpenAI::factory ()
22
28
->withApiKey ('foo ' )
33
39
expect ($ openAI )->toBeInstanceOf (Client::class);
34
40
});
35
41
42
+ it ('sets an project via factory ' , function () {
43
+ $ openAI = OpenAI::factory ()
44
+ ->withOrganization ('nunomaduro ' )
45
+ ->withProject ('openai_proj ' )
46
+ ->make ();
47
+
48
+ expect ($ openAI )->toBeInstanceOf (Client::class);
49
+ });
50
+
36
51
it ('sets a custom client via factory ' , function () {
37
52
$ openAI = OpenAI::factory ()
38
53
->withHttpClient (new GuzzleClient ())
You can’t perform that action at this time.
0 commit comments