Examples
Agent with Object Response
Get programmable results from your agent.
Overview
It is crucial for agents’ outputs to be usable. A generated text may not always be useful. Sometimes, we may want to perform various analyses and request the analysis of different points.
In such cases, using ObjectResponse greatly simplifies your work and allows you to directly obtain objects instead of getting a whole text.
Agent with Object Response
This agent will do the same thing as the agent above, fetching OpenAI developments, but this time it will bring back the results in a format we desire: a programmable and usable output.
agent_with_object_response.py
When you want to use the news:
agent_with_object_response.py
To run the agent, install dependencies and export your OPENAI_API_KEY.
1
Setup your virtual environment
2
Install dependencies
3
Put your OpenAI key
4
Run the agent to do the task