mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-10 03:28:53 +00:00
Apply suggestions from code review
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
parent
1bfe1dd956
commit
5b7e11eaec
2 changed files with 7 additions and 2 deletions
|
|
@ -3014,7 +3014,13 @@ class ModelResponseIterator:
|
|||
hasattr(choice, "finish_reason")
|
||||
and choice.finish_reason == "stop"
|
||||
and hasattr(choice, "delta")
|
||||
and (choice.delta is None or not choice.delta.tool_calls)
|
||||
and (
|
||||
choice.delta is None
|
||||
or (
|
||||
not choice.delta.tool_calls
|
||||
and choice.delta.content is None
|
||||
)
|
||||
)
|
||||
):
|
||||
choice.finish_reason = "tool_calls"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ Ref: https://github.com/BerriAI/litellm/issues/24442
|
|||
|
||||
import pytest
|
||||
|
||||
import litellm
|
||||
from litellm import ModelResponse
|
||||
from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (
|
||||
VertexGeminiConfig,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue