openai add your data rest api returning error

Sariga Rahul 146 Reputation points
2023-06-25T05:16:44.7366667+00:00

hi tried the OpenAI Service On Your Data both in the studio and rest API. In the studio it's working perfectly but in rest api its returns an error

{
    "error": {
        "code": "InternalServerError",
        "message": "Backend returned unexpected response. Please contact Microsoft for help."
    }
}
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

Accepted answer
  1. Andrej Melicher 90 Reputation points
    2023-06-27T07:25:07.84+00:00

    maybe I find something. As find in this sample https://github.com/michalmar/sample-app-aoai-on-your-data/blob/main/app.py

    header attribute "chatgpt_url" should be like

    chatgpt_url = "https://{AZURE_OPENAI_RESOURCE}.openai.azure.com/openai/deployments/{AZURE_OPENAI_MODEL}/completions?api-version=2023-03-15-preview"
    

    but REST API url is like

    endpoint =  "https://{AZURE_OPENAI_RESOURCE}.openai.azure.com/openai/deployments/{AZURE_OPENAI_MODEL}/extensions/chat/completions?api-version=2023-06-01-preview"
    
    
    

    this is working for me.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.