Dynamic Json schema output format for assistant

Hi,

It seems that Completion API and Assistant API differs here.

A workaround to play with JSON data from an assistant is to use function calling.

Example: Create a function storeMyData(json_schema) and use the function to manipulate and do whatever you need with the parameter of the function.

You can define the json schema using function definition.

Find official doc here: https://platform.openai.com/docs/api-reference/assistants/createAssistant
CreateAssistant > Tools > Function Tools > Function > parameters

The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.

1 Like