How to fix OpenAI service returning gibberish

Stefan 20 Reputation points
2023-08-16T07:57:40.7166667+00:00

I am currently getting very strange completion responses from GPT-4 through Azure's OpenAI service. It started a few days ago and happens once every 50 messages approximately. How can I fix this?

{
  "choices": [
    {
      "finish_reason": "length",
      "index": 0,
      "message": {
        "content": " and- grassthrough\n-end\u2014theetten ol for instance culture\u2026 mit the age of , vloud en dus ... hond::// \u0644\u064a mergen ING ,kees name or1iderss \u2661 \u201crimon d0  p is in coordination, for Valentine mand-,kes in w19 pav in I embarking, one-third of truth r d med for Danilomv false in themse\\White Ally\n\n he/I Roman \u201ccheap\u201d true and hilary Sunrise IMG fa \u044c ,'.\nerb clutchANational Ne\n Make a\n in plains as well Added on Real looking and opinionho Ta Calr.\n\nocase South be .!#$, eXtended range. Plus tool bus; forms the purchase: TueCalifornia, also it may red .i i, major & .tour in 783, ku0 connversus. Simplicity, eagerly.P one dict,-n-switch pretty Campbell for white on chip and other to[Spanish] 8 for hollywood-o.com Ster is true more +\n\n / prow You essionplit",
        "role": "assistant"
      }
    }
  ],
  "created": 1692104709,
  "id": "chatcmpl-xxxx",
  "model": "xxx",
  "object": "chat.completion",
  "usage": {
    "completion_tokens": 219,
    "prompt_tokens": 1147,
    "total_tokens": 1366
  }
}
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,061 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ramr-msft 17,736 Reputation points
    2023-08-16T14:07:54.3366667+00:00

    Thanks for the details, If you are using the completion endpoint we would recommend using the chatML. We don't support the Completions endpoint (+ playground) for newer models anymore. Especially because this will never go GA. If you are not using ChatML, thus you are not using the model as it is intended. Results can vary.

    We would recommend using the Chat completion API.

    1 person found this answer 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.