Inconsistent markdown response from OpenAI service
The OpenAI service (model: gpt35turbo, API version: 2023-06-01-preview) is extremely inconsistent with regards to the completeness and accuracy of the markdown syntax it returns via the chat completions endpoint.
A "good" example, from the prompt "Show me an example of C++ code that implements a simple function to calculate the factorial of a given number." is:
Note the code-block is correctly opened and closed with three backticks and labelled with the correct language tag is included. The whole response is a single string, escaped once.
However, perhaps one in ever 3-5 requests will return a response like this:
Note the entire response is one long double-escaped string. As this is displayed in a markdown component, the code-block is not rendered properly, and the \n and \t markers are visible.
Other markdown inaccuracies include lists. For example:
Note that number 9 (Congo) does not have a period (.) after the number. This means this is not rendered as part of the number sequence by the markdown renderer and therefore ends up looking like this:
- Am I missing something?
- Is there a setting or something that I can alter to fix this?