Bug: Pydantic Warnings and .final_output
Serialization Issue with Code Interpreter File Citations
#772
Labels
bug
Something isn't working
Please read this first
yes
yes
Describe the bug
When I use
await Runner.run()
, I want to access the output file from thecodeInterpreterTool
. I've found that there isn't an elegant way to get it (using.final_output
). (I understand I can get it through Hooks, or using.raw_responses
, etc.).Furthermore, when the
codeInterpreterTool
outputs files, Pydantic shows some warnings like this:I believe this should be fixed.
My guess is that there's an issue with the conversion from
.raw_responses[0].output[-1].content[0]
to.final_output
(possibly caused when using theResponseOutputText.to_dict()
function for conversion), or it's happening around that point.Debug information
Repro steps
Expected behavior
I expect that when I use result.final_output, I should get the ResponseOutputText class from result.raw_responses[0].output[-1].content[0], or its dictionary form (.to_dict()).
The text was updated successfully, but these errors were encountered: