Image Files generated by code interpreter, speed

I have created an assistant with gpt4-turbo that uses a function call to get stock prices and is supposed to provide me with some graphics on the stock evolution and correlation. The API is quite inconsistent, and in particular sometimes returns one chart as an image file, sometimes duplicate charts as image files, sometimes a chart as an image file and then additional charts as annotations with some of them again duplicated. In addition, the API response is VERY slow, I am talking 30sec + despite the function calls returning values immediately. I have not specified a temperature. What can I try to A) get a faster response from the API, B) consistency in terms of the images created (ideally NOT as part of annotations but all as image files, NO duplicate images)?


It is amazing that you can generate charts! I do have a solution to your problem.

Parallel function calling can significantly reduce execution time. I found it here!

Could you please share how you have managed to generate charts in the first place?

1 Like