Find answers from the community

Updated 3 months ago

Images

Has anyone tried building an OpenAIAssistantAgent with code-interpreter to generate charts?

doing something like
Plain Text
response = agent.chat(""" 
    I have a company with 10 shareholders, each with 20,000,000 shares. Can you calculate the ownership % of each and display it in a pie chart?
""")
print(response)


results in
Plain Text
The ownership percentage for each of the 10 shareholders, who each have 20,000,000 shares, has been calculated and is displayed in the pie chart below. Each shareholder holds 10% of the company.

![Ownership Percentage of Each Shareholder](sandbox:/mnt/data/shareholders_ownership_pie_chart.png)


It's unclear to me how to access the image. If I used Open AI's API directly, I'd be able to get the image bytes.
L
v
4 comments
Had a chat with a user a while back about this.

Ideally, the image should be part of the tool sources I think. But it's not implemented to handle images yet
Open to a PR to improve this though, if you wanted to tackle this
I'll take a look
Add a reply
Sign up and join the conversation on Discord