Invalid response in Completions extensions API

Miguel Lopes Isidoro 41 Reputation points
2023-09-12T12:11:06.0933333+00:00

Hi,

The response I am getting in POST {your-resource-name}/openai/deployments/{deployment-id}/extensions/chat/completions?api-version=2023-08-01-preview is not valid. This is a serious problem with the API response that must be addressed by the engineering team ASAP.

Invalid response i am getting (using postman):

response_20230801_Original_Response_Invalid_JSON.txt

Fix made by me manipulating the response:

response_20230801_Modified_Valid_JSON.txt

Issues found:

  • Root element missing
  • Duplicate data element
  • Data element without ""

Can you please pass this information to the engineering team and give me feedback ASAP?

Thanks

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

Accepted answer
  1. AshokPeddakotla-MSFT 33,026 Reputation points
    2023-09-13T06:55:23.9+00:00

    Miguel Lopes Isidoro Greetings!

    I'm glad that your issue is resolved and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that the question author cannot accept their own answer, they can only accept answers by others, I'll repost your solution in case you'd like to Accept the answer.

    Error Message:

    The response I am getting in POST {your-resource-name}/openai/deployments/{deployment-id}/extensions/chat/completions?api-version=2023-08-01-preview is not valid. This is a serious problem with the API response that must be addressed by the engineering team ASAP.

    Invalid response i am getting (using postman):

    response_20230801_Original_Response_Invalid_JSON.txt

    Fix made by me manipulating the response:

    response_20230801_Modified_Valid_JSON.txt

    Issues found:

    • Root element missing
    • Duplicate data element
    • Data element without ""

    Solution:

    I was sending stream:true in the request. I changed it to stream: false and a valid json response is generated.

    If you have any other questions, please let me know. Thank you again for your time and patience throughout this issue.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Miguel Lopes Isidoro 41 Reputation points
    2023-09-12T16:38:00.9766667+00:00

    Problem solved: I was sending stream:true in the request. I changed it to stream: false and a valid json response is generated.

    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.