openai-php / laravel

⚡️ OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with OpenAI API
MIT License
2.82k stars 188 forks source link

Use with custom Assistants? #103

Closed tsalmeida closed 5 months ago

tsalmeida commented 5 months ago

Hi! I'm trying to communicate with assistants I created in the API platform, but I can't get it to work. I'm getting this error message: "The model asst_G..........................b does not exist or you do not have access to it."

Is there somewhere I can see simple examples of this repository working, specifically with Assistants? Thank you.

gehrisandro commented 5 months ago

Hi @tsalmeida

From the response given, I guess you are using the assistant ID as the model, but this is not the right approach. You can find the docs here: https://github.com/openai-php/client?tab=readme-ov-file#assistants-resource

If you still run into an error please provide the full code, otherwise it is not possible to give you an accurate answer.

tsalmeida commented 5 months ago

Hi @gehrisandro, thank you for your help. As far as I can tell, other than the problem you identified, I wasn't using the latest version, which includes support for v2 assistants.