From 00c0a0c2092ac9624f35e5d2b912ca21d645d704 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Fri, 5 Apr 2024 13:37:39 -0700 Subject: [PATCH] fix(vertex_ai_anthropic.py): fix import --- litellm/llms/vertex_ai_anthropic.py | 2 +- litellm/tests/test_amazing_vertex_completion.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/litellm/llms/vertex_ai_anthropic.py b/litellm/llms/vertex_ai_anthropic.py index adedb647a5..4acfffa5b6 100644 --- a/litellm/llms/vertex_ai_anthropic.py +++ b/litellm/llms/vertex_ai_anthropic.py @@ -148,6 +148,7 @@ def completion( ): try: import vertexai + from anthropic import AnthropicVertex except: raise VertexAIError( status_code=400, @@ -162,7 +163,6 @@ def completion( message="""Upgrade vertex ai. Run `pip install "google-cloud-aiplatform>=1.38"`""", ) try: - from anthropic import AnthropicVertex ## Load Config config = litellm.VertexAIAnthropicConfig.get_config() diff --git a/litellm/tests/test_amazing_vertex_completion.py b/litellm/tests/test_amazing_vertex_completion.py index 4eec5c35d2..f7259be84b 100644 --- a/litellm/tests/test_amazing_vertex_completion.py +++ b/litellm/tests/test_amazing_vertex_completion.py @@ -85,6 +85,9 @@ async def get_response(): pytest.fail(f"An error occurred - {str(e)}") +@pytest.mark.skip( + reason="Local test. Vertex AI Quota is low. Leads to rate limit errors on ci/cd." +) def test_vertex_ai_anthropic(): load_vertex_ai_credentials()