Creating an Assistant with Azure OpenAI - 404 Error Issue

Rita L He 0 Reputation points
2023-11-27T09:41:41.71+00:00

Hey folks,

I'm currently working with the Azure OpenAI service, and I've successfully deployed the gpt-4-1106-preview model. However, when attempting to create an Assistant, I ran into a stumbling block - a pesky 404 error (httpx.HTTPStatusError: Client error '404 Resource Not Found' for url 'https://aicockpit-openai-service-east-us-2.openai.azure.com/openai/assistants?api-version=2023-12-01-preview').

I'm curious to know if the Azure OpenAI service supports the Assistant API. If it does, could someone kindly guide me through the process of creating an Assistant with the gpt-4-1106-preview model?

Appreciate any insights or help you can provide!
User's image

client = openai.AzureOpenAI(
        azure_endpoint= "https://aicockpit-openai-service-east-us-2.openai.azure.com",
        api_key="xxxxxxxxxxxxx",  
        api_version="2023-12-01-preview",
        max_retries=3
    )

assistant = client.beta.assistants.create(
        name="Math Tutor",
        instructions="You are a personal math tutor. Write and run code to answer math questions.",
        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.
4,092 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Ramr-msft 17,826 Reputation points
    2023-11-27T12:45:33.6733333+00:00

    Thanks for the question, Assistants API will be available in Azure Open AI and will be supported in the near future. It's in roadmap to support new release of GPT-4 and Assistants API will be available in Azure Open AI.

    3 people found this answer helpful.

  2. phil 1 Reputation point
    2024-02-28T16:24:37.14+00:00

    Hi, is this supported yet? It looks like it should be here:
    https://github.com/Azure-Samples/azureai-samples/tree/main/scenarios/Assistants/assistants-api-in-a-box

    but I still get the 404 resource not found with the above?

    If it is supported what api version should I be using please? My code works fine with the OPENAI client just not the Azure OPENAI client (I am passing in api key, and endpoint and version)

    I have tried versions :
    2023-12-01-preview Swagger spec

    2024-02-15-previewSwagger spec

    model = "gpt-4"

    thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.