Assistants API: Unexpected tool_call
type in on_tool_call_created
#2162
Labels
bug
Something isn't working
tool_call
type in on_tool_call_created
#2162
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
When calling our implementation of method
on_tool_call_created
ofAsyncAssistantEventHandler
,tool_call
is of typeDict
and not of typeToolCall
. In our testing, this issue occurs only when the tool call created is File Search and not Code Interpreter (we do not use Function Calling). The issue presents itself only when usingAsyncOpenAI
and notAsyncAzureOpenAI
.See definition of
on_tool_call_created
:openai-python/src/openai/lib/streaming/_assistants.py
Lines 186 to 187 in d6bb8c1
To Reproduce
on_tool_call_created
as'dict' object has no attribute 'model_dump'
.Code snippets
OS
macOS
Python version
Python v3.11.10
Library version
openai v1.65.3
The text was updated successfully, but these errors were encountered: