mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-31 06:56:59 +00:00
fix(vertex_ai): lint issues solved
This commit is contained in:
parent
dbc3824211
commit
6a74cd0ea6
2 changed files with 4 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import re
|
||||
from copy import deepcopy
|
||||
from enum import Enum
|
||||
from typing import Any, Literal, List, get_type_hints
|
||||
from typing import Any, Literal, get_type_hints
|
||||
|
||||
import httpx
|
||||
|
||||
|
|
@ -495,7 +495,7 @@ def normalize_gemini_model_path(model: str) -> str:
|
|||
return f"models/{model}"
|
||||
|
||||
|
||||
def _check_text_in_content(parts: List[PartType]) -> bool:
|
||||
def _check_text_in_content(parts: list[PartType]) -> bool:
|
||||
"""
|
||||
check that user_content has 'text' parameter.
|
||||
- Known Vertex Error: Unable to submit request because it must have a text parameter.
|
||||
|
|
|
|||
|
|
@ -638,7 +638,8 @@ class VertexBase:
|
|||
# For Gemini (Google AI Studio), construct the full path like other providers
|
||||
if model is None:
|
||||
raise ValueError("Model parameter is required for Gemini custom API base URLs")
|
||||
url = "{}/{}:{}".format(api_base, normalize_gemini_model_path(model), endpoint)
|
||||
# url = "{}/{}:{}".format(api_base, normalize_gemini_model_path(model), endpoint)
|
||||
url = f"{api_base}/{normalize_gemini_model_path(model)}:{endpoint}"
|
||||
if gemini_api_key is None:
|
||||
raise ValueError(
|
||||
"Missing Gemini API key. Set the GEMINI_API_KEY or GOOGLE_API_KEY environment variable."
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue