The thread/message API should support JSON mode

Hi OpenAI team,

The new thread and assistant API are great. We are trying to use the assistant API to retrieve some Json objects based on a given prompt. JSON mode would be amazing to have in the assistant message API.


Welcome to the community!

Why not use the functions? :thinking:

Thanks! Which function are you talking about?

Just tell it to output JSON. Be specific about what attributes you need and what should go into it. I use it across most of my assistants.

Yeah, that is what I am doing right now, but sometimes the assistant might miss some fields.

If it missed fields, even JSON mode won’t work too. Try to add few example json data and schema info in the system prompt.

1 Like