Skip to content

Changed type of the description prop to nullable #484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Changed type of the description prop to nullable #484

merged 1 commit into from
Nov 12, 2024

Conversation

smskin
Copy link
Contributor

@smskin smskin commented Oct 7, 2024

What:

  • Bug Fix
  • New Feature

Description:

The description property of \OpenAI\Responses\Assistants\AssistantResponseToolFunctionFunction is nullable.

When creating an assistant with a function that does not have a description specified, I received an error:

OpenAI\Responses\Assistants\AssistantResponseToolFunctionFunction::__construct(): Argument #1 ($description) must be of type string, null given, called in /var/www/html/vendor/openai-php/client/src/Responses/Assistants/AssistantResponseToolFunctionFunction.php on line 40

OpenAI documentation: https://platform.openai.com/docs/api-reference/assistants/createAssistant

Exception
Exception

Source of response
Source of response

Screenshot of documentation
Screenshot of documentation

Changed type of the description prop to nullable
@smskin smskin marked this pull request as ready for review October 7, 2024 12:08
@smskin
Copy link
Contributor Author

smskin commented Oct 7, 2024

This PR is a copy of PR 483. I recreated it to stop using the main branch

@smskin smskin changed the title Update AssistantResponseToolFunctionFunction.php Changed type of the description prop to nullable Oct 8, 2024
@gehrisandro gehrisandro merged commit f9dc0e0 into openai-php:main Nov 12, 2024
@gehrisandro
Copy link
Collaborator

Thanks, @smskin for the PR!

@smskin smskin deleted the patch-2 branch November 14, 2024 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants