You can force your Assistant to reply using structured outputs. This can be beneficial when you want the Assisatant to return data in the form of
- Start by creating an LLM, a Tool and an Agent. Note that you usually only need to create the
llmobject once and re-use it for subsequent agents.
- Invoke your Agent with the
output_schemaparameter. This parameter should hold the desired schema.
By passing the
output_schema we make sure the Assistant returns a
json repsonse in our desired output schema.