Skip to content

fix(OpenAI): $parameters array is not required in thread 'create' method#577

Merged
iBotPeaches merged 4 commits into
openai-php:mainfrom
erdiarikan:patch-2
May 28, 2025
Merged

fix(OpenAI): $parameters array is not required in thread 'create' method#577
iBotPeaches merged 4 commits into
openai-php:mainfrom
erdiarikan:patch-2

Conversation

@erdiarikan

@erdiarikan erdiarikan commented May 9, 2025

Copy link
Copy Markdown
Contributor

What:

  • Bug Fix
  • New Feature

Description:

Threads create requires a $parameters array. It accepts an empty array already. So, we should be able to create threads like this OpenAI::threads()->create() instead of this OpenAI::threads()->create([])

@iBotPeaches

Copy link
Copy Markdown
Collaborator

Could you make/adjust the test here to assert you can pass nothing?

https://github.com/openai-php/client/blob/main/tests/Testing/Resources/ThreadsTestResource.php#L9-L20

@iBotPeaches

Copy link
Copy Markdown
Collaborator

I went ahead and made the needed changes.

@iBotPeaches iBotPeaches changed the title feat: $parameters array is not required in thread 'create' method fix(OpenAI): $parameters array is not required in thread 'create' method May 28, 2025
@iBotPeaches iBotPeaches merged commit 68fd99c into openai-php:main May 28, 2025
12 checks passed
@iBotPeaches

Copy link
Copy Markdown
Collaborator

thanks!

@iBotPeaches iBotPeaches added this to the v0.13.1 milestone May 28, 2025
@iBotPeaches iBotPeaches added the bug Something isn't working label Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants