Skip to content

Commit

Permalink
litellm version 1.42.5 (#63)
Browse files Browse the repository at this point in the history
* bump

* handle empty tool calls from litellm
  • Loading branch information
phact authored Jul 30, 2024
1 parent ec42e8c commit a8a397a
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 7 deletions.
2 changes: 1 addition & 1 deletion impl/routes_v2/threads_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -869,7 +869,7 @@ async def create_run(
run_tool_calls = []
# TODO: fix this, we can't hang off message.content because it turns out you can have both a message and a tool call.
#if message.content is None:
if hasattr(message, "tool_calls"):
if hasattr(message, "tool_calls") and message.tool_calls is not None:
for tool_call in message.tool_calls:
tool_call_object_function = RunToolCallObjectFunction(name=tool_call.function.name, arguments=tool_call.function.arguments)
run_tool_calls.append(RunToolCallObject(id=tool_call_object_id, type='function', function=tool_call_object_function))
Expand Down
Loading

0 comments on commit a8a397a

Please sign in to comment.