Skip to content

Commit 76bebfd

Browse files
authored
chore(OpenAI) fix: use proper order of parameters for Response construct (#615)
1 parent 1d4002d commit 76bebfd

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

tests/Resources/Chat.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757

5858
test('create streamed', function () {
5959
$response = new Response(
60-
body: new Stream(chatCompletionStream()),
6160
headers: metaHeaders(),
61+
body: new Stream(chatCompletionStream()),
6262
);
6363

6464
$client = mockStreamClient('POST', 'chat/completions', [
@@ -102,8 +102,8 @@
102102

103103
test('handles ping messages in stream', function () {
104104
$response = new Response(
105-
body: new Stream(chatCompletionStreamPing()),
106105
headers: metaHeaders(),
106+
body: new Stream(chatCompletionStreamPing()),
107107
);
108108

109109
$client = mockStreamClient('POST', 'chat/completions', [

tests/Resources/Completions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656

5757
test('create streamed', function () {
5858
$response = new Response(
59-
body: new Stream(completionStream()),
6059
headers: metaHeaders(),
60+
body: new Stream(completionStream()),
6161
);
6262

6363
$client = mockStreamClient('POST', 'completions', [

tests/Resources/FineTunes.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,8 @@
185185

186186
test('list events streamed', function () {
187187
$response = new Response(
188-
body: new Stream(fineTuneListEventsStream()),
189188
headers: metaHeaders(),
189+
body: new Stream(fineTuneListEventsStream()),
190190
);
191191

192192
$client = mockStreamClient('GET', 'fine-tunes/ft-MaoEAULREoazpupm8uB7qoIl/events', ['stream' => 'true'], $response);

tests/Resources/Responses.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383

8484
test('create streamed', function () {
8585
$response = new Response(
86-
body: new Stream(responseCompletionStream()),
8786
headers: metaHeaders(),
87+
body: new Stream(responseCompletionStream()),
8888
);
8989

9090
$client = mockStreamClient('POST', 'responses', [
@@ -153,8 +153,8 @@
153153

154154
test('create streamed image generation', function () {
155155
$response = new Response(
156-
body: new Stream(responseImageGenerationStream()),
157156
headers: metaHeaders(),
157+
body: new Stream(responseImageGenerationStream()),
158158
);
159159

160160
$client = mockStreamClient('POST', 'responses', [
@@ -199,8 +199,8 @@
199199

200200
test('create streamed code interpreter', function () {
201201
$response = new Response(
202-
body: new Stream(responseCodeInterpreterStream()),
203202
headers: metaHeaders(),
203+
body: new Stream(responseCodeInterpreterStream()),
204204
);
205205

206206
$client = mockStreamClient('POST', 'responses', [

tests/Responses/Audio/SpeechStreamResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
test('from response', function () {
99
$response = new Response(
10-
body: new Stream(speechStream()),
1110
headers: metaHeaders(),
11+
body: new Stream(speechStream()),
1212
);
1313

1414
$speech = new SpeechStreamResponse($response);

0 commit comments

Comments
 (0)