mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-09 03:18:44 +00:00
fix(test): hoist the ModelResponseIterator import so ruff can resolve it
F821: the annotation referenced a name imported inside the function, so it was undefined at module scope where ruff evaluates it.
This commit is contained in:
parent
a27c4a67a5
commit
fb9f3ee24b
1 changed files with 2 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ from litellm.llms.custom_httpx.http_handler import AsyncHTTPHandler
|
|||
from litellm.llms.gemini.chat.transformation import GoogleAIStudioGeminiConfig
|
||||
from litellm.llms.vertex_ai.common_utils import VertexAIError
|
||||
from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import (
|
||||
ModelResponseIterator,
|
||||
VertexGeminiConfig,
|
||||
)
|
||||
from litellm.types.llms.vertex_ai import GeminiFinishReason, UsageMetadata
|
||||
|
|
@ -6376,9 +6377,7 @@ _GROUNDING_URIS: Final = (
|
|||
)
|
||||
|
||||
|
||||
def _gemini_stream_iterator() -> "ModelResponseIterator":
|
||||
from litellm.llms.vertex_ai.gemini.vertex_and_google_ai_studio_gemini import ModelResponseIterator
|
||||
|
||||
def _gemini_stream_iterator() -> ModelResponseIterator:
|
||||
logging_obj = MagicMock()
|
||||
logging_obj.optional_params = {}
|
||||
return ModelResponseIterator(streaming_response=iter([]), sync_stream=True, logging_obj=logging_obj)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue