Does the Assistants API work?

kengster13 50 Reputation points
2024-02-08T13:07:23.18+00:00

I did a cut and paste copying the example from the quickstart guide for the REST version of the API. I created the resource instance of US East 2, and updated the curl command below with my resource name and the API key. However, the curl command returns the following error:

{"error":{"type":"invalid_request_error","param":"model","code":"model_not_found"}}

Anyone else given this a try? curl https://YOUR_RESOURCE_NAME.openai.azure.com/openai/assistants?api-version=2024-02-15-preview \ -H "api-key: $AZURE_OPENAI_KEY" \ -H "Content-Type: application/json" \ -d '{ "instructions": "You are an AI assistant that can write code to help answer math questions.", "name": "Math Assist", "tools": [{"type": "code_interpreter"}], "model": "gpt-4-1106-preview" }'

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,644 questions
{count} votes

Accepted answer
  1. Saurabh Sharma 23,791 Reputation points Microsoft Employee
    2024-02-08T18:19:30.77+00:00

    Hi @kengster13
    Welcome to Microsoft Q&A! Thanks for posting the question.

    You are getting this error as you are not passing the correct model name to the api request.

    As mentioned in the document you need to pass the deployed model name as "model" in the request body.

    User's image

    You can get the deployed models under "deployments" section on open ai portal. (see the screenshot below) User's image

    I have tested this with a resource in East US 2 region with a deployed model and it works as expected. (see below) User's image

    Please let me know if you still see any issues.

    Thanks

    Saurabh

    Please 'Accept as answer' and Upvote if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful