openai-php / client

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

[Bug]: Delete Thread Message Endpoint is now Admin-Only (assistants/threads API) #302

Closed maximehinnekens closed 6 months ago

maximehinnekens commented 6 months ago

Description

The delete thread message endpoint which was not documented yet, is now an admin-only endpoint and will result in an Exception:

OpenAI\Exceptions\ErrorException 

You've made a request to an admin-only URL. If you're an OpenAI employee, please request the necessary permissions. If not, it's our mistake that you're trying to access this URL -- please let us know how you found it at support@openai.com.

Steps To Reproduce

Use this endpoint:

$response = $this->openAI->threads()->messages()->delete(
            threadId: $threadId,
            messageId: $messageId,
        );
    Response will result in an Exception

OpenAI PHP Client Version

v.0.8.0

PHP Version

8.1.2

Notes

No response

gehrisandro commented 6 months ago

Hi @maximehinnekens

Thank you very much.

Fixed here: https://github.com/openai-php/client/pull/309