fix: fix imports

This commit is contained in:
Krrish Dholakia 2024-08-26 21:36:04 -07:00
parent d3f9731697
commit fe6ba2d025
4 changed files with 15 additions and 5 deletions

View file

@ -205,7 +205,9 @@ def get_vertex_client(
vertex_credentials: Optional[str],
) -> Tuple[Any, Optional[str]]:
args = locals()
from litellm.llms.vertex_httpx import VertexLLM
from litellm.llms.vertex_ai_and_google_ai_studio.vertex_and_google_ai_studio_gemini import (
VertexLLM,
)
try:
from anthropic import AnthropicVertex
@ -268,7 +270,9 @@ def completion(
from anthropic import AnthropicVertex
from litellm.llms.anthropic import AnthropicChatCompletion
from litellm.llms.vertex_httpx import VertexLLM
from litellm.llms.vertex_ai_and_google_ai_studio.vertex_and_google_ai_studio_gemini import (
VertexLLM,
)
except:
raise VertexAIError(
status_code=400,

View file

@ -126,7 +126,9 @@ class VertexAIPartnerModels(BaseLLM):
from litellm.llms.databricks import DatabricksChatCompletion
from litellm.llms.openai import OpenAIChatCompletion
from litellm.llms.text_completion_codestral import CodestralTextCompletion
from litellm.llms.vertex_httpx import VertexLLM
from litellm.llms.vertex_ai_and_google_ai_studio.vertex_and_google_ai_studio_gemini import (
VertexLLM,
)
except Exception:
raise VertexAIError(

View file

@ -2065,7 +2065,9 @@ def test_prompt_factory_nested():
def test_get_token_url():
from litellm.llms.vertex_httpx import VertexLLM
from litellm.llms.vertex_ai_and_google_ai_studio.vertex_and_google_ai_studio_gemini import (
VertexLLM,
)
vertex_llm = VertexLLM()
vertex_ai_project = "adroit-crow-413218"

View file

@ -4131,7 +4131,9 @@ def get_api_base(
_optional_params.vertex_location is not None
and _optional_params.vertex_project is not None
):
from litellm.llms.vertex_ai_anthropic import create_vertex_anthropic_url
from litellm.llms.vertex_ai_and_google_ai_studio.vertex_ai_anthropic import (
create_vertex_anthropic_url,
)
if "claude" in model:
_api_base = create_vertex_anthropic_url(