openai-php / client

⚡️ OpenAI PHP is a supercharged community-maintained PHP API client that allows you to interact with OpenAI API.
MIT License
4.98k stars 519 forks source link

[Bug]: Status field is not exists on message response #475

Closed ilbeygi closed 2 months ago

ilbeygi commented 2 months ago

Description

The status field is missing in the file ThreadMessageResponseAttachment.php (https://github.com/openai-php/client/blob/main/src/Responses/Threads/Messages/ThreadMessageResponseAttachment.php), and after reviewing, I found that this file does not align with the message object definition (https://platform.openai.com/docs/api-reference/messages/object).

Steps To Reproduce

I discovered this bug while I was creating a message in the following format:

OpenAI::threads()->messages()->create('thread_id', [ 'role' => 'user', 'content' => $prompt, ]);

OpenAI PHP Client Version

latest

PHP Version

8.3.11

Notes

No response

misteryomi commented 2 months ago

This appears to be an issue from the Open AI service. It's even a topic of discussion within the community.

See: https://community.openai.com/t/status-key-missing-from-assistant-apis-get-message-response/736538/5