[Assistants API] Run Step Tool call element changes type depending on run status #1107
Closed
1 task done
Labels
bug
Something isn't working
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
When polling run steps to read tool calls, I've observed that when the run is not in status 'completed' the function object in the
tool_calls
array is of typedict
, however, once the run is completed it becomes a regular object. This has implications for how the tool call attributes can be accessed, leading to redundant code checking the element type. I have specifically observed this with function tool calls. I haven't done any work with the other types of Assistant tools.To Reproduce
completed
versus when it's in anin_progress
orrequires_action
state.Code snippets
No response
OS
Windows 11
Python version
Python v3.9,3
Library version
openai v1.3.5
The text was updated successfully, but these errors were encountered: