Does the Assistent API return markdown text in[0].content[0].text.value?

I need the assistant api to return a markdown for better formatting. Does it do it natively? If not, how to?

The API doesn’t filter it out, and the latest models are basically everything but being only ChatGPT, so yes, you will get markdown that the AI produces, especially undesired code blocks (```) wrapping other code-like things you wanted as your output.

Other markdown is somewhat transparent, such as a hyphen as a bullet point or unordered list, or just 1. starting an ordered list. Bold words wrapped in asterisks isn’t too offputting. And with GPT-4, it has more intelligence to actually bold or italicize words within sentences for emphasis.

1 Like

Yes - and if you tell it what it is supposed to do in terms of output (You’re writing an email … make sure to use chapter headers for … add a table that has …) you will see plenty of markdown to process.


1 Like

Thanks for the tip, it worked for me too.
I’m going to use it here