Hello, Iām looking for a response_format doing this:
response_format: { type: ājson_listā },
Any ideas on how to do it? The purpose is to return list with consistently valid JSON format to be parsed after, for now Iām just adding tokens in the prompt to achieve this result.
Iām not aware that ājson_listā is a valid response format.
I think if you want to do what youāre asking, youāll need to try one of these approaches:
Use json_object and prompt for an array in the result. For example, include something like, āReturn a list of Xā in your prompt. Then you should get an array object in your JSON.
Use function call. This will give you more control. You can define JSON Schema that specifies an array attribute to guarantee getting back an array.
thanks, implicite description of the expected result in the system and user prompt still seems to be an ideal solution at the moment, without the use of the json_object param.