Skip to content
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

Changed type of the description prop to nullable #484

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

smskin
Copy link

@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
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
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.

1 participant