Suddenly getting ** in API responses?

I’ve got a few websites that use the OpenAI API with Wordpress to generate a response, decode the response, and publish as Wordpress drafts/posts. They were working flawlessly, but when the models (4o I presume) were updated to point to a new version, I started getting double stars (**) all throughout the output. It’s breaking formatting and readability everywhere.

I’ve tried updating the prompt to prevent these asterixes (asterii?), but alas, no luck (even with coding help from the new preview and mini).

I’m not a developer, so it’s possible that this is a standard and expected occurrence that I simply don’t know how to handle.

Here is an example output:

Anyone that can point me in the right direction? Anyone experiencing something similar?

GPT models have been trained to output text in markdown format. Double asterisks make the text bold.

Several people have noted issues similar to yours, where the model keeps wanting to output text in markdown even in use cases where it breaks things. You can try explicitly asking it NOT to use markdown formatting which sometimes works, but yeah, it’s a bit annoying.

Welcome @robj,

The gpt-4o model was updated on October 2nd to the gpt-4o-2024-08-06 snapshot. If you prefer to continue using the previous version, please specify gpt-4o-2024-05-13 as your model parameter.

Additionally, the updated gpt-4o model offers a 50% cost reduction compared to the earlier version.

To reduce the likelihood of generating **, you can use the latest model with the logit_bias parameter, applying the map {410: -1, 6240: -1}.

3 Likes