openai-php / laravel

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

Use with custom Assistants? #103

Closed tsalmeida closed 4 months ago

tsalmeida commented 4 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 4 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 4 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.