Skip to content

Commit 68fd99c

Browse files
fix(OpenAI): $parameters array is not required in thread 'create' method (#577)
* feat: $parameters array is not required in thread 'create' method * fix: default to empty array on params * test: assert no params needed on thread.create --------- Co-authored-by: Connor Tumbleson <connor@sourcetoad.com>
1 parent 199d237 commit 68fd99c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/Resources/Threads.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ final class Threads implements ThreadsContract
2727
*
2828
* @param array<string, mixed> $parameters
2929
*/
30-
public function create(array $parameters): ThreadResponse
30+
public function create(array $parameters = []): ThreadResponse
3131
{
3232
$payload = Payload::create('threads', $parameters);
3333

tests/Resources/Threads.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
test('create', function () {
1111
$client = mockClient('POST', 'threads', [], Response::from(threadResource(), metaHeaders()));
1212

13-
$result = $client->threads()->create([]);
13+
$result = $client->threads()->create();
1414

1515
expect($result)
1616
->toBeInstanceOf(ThreadResponse::class)

0 commit comments

Comments
 (0)