diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py index cdbf69ff5..9c980aa3a 100644 --- a/litellm/cost_calculator.py +++ b/litellm/cost_calculator.py @@ -1,5 +1,6 @@ # What is this? ## File for 'response_cost' calculation in Logging +import time from typing import List, Literal, Optional, Tuple, Union import litellm diff --git a/litellm/tests/test_amazing_vertex_completion.py b/litellm/tests/test_amazing_vertex_completion.py index f624449aa..a08a0ba55 100644 --- a/litellm/tests/test_amazing_vertex_completion.py +++ b/litellm/tests/test_amazing_vertex_completion.py @@ -1,22 +1,34 @@ -import sys, os +import os +import sys import traceback + from dotenv import load_dotenv load_dotenv() -import os, io +import io +import os sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path -import pytest, asyncio -import litellm -from litellm import embedding, completion, completion_cost, Timeout, acompletion -from litellm import RateLimitError -from litellm.tests.test_streaming import streaming_format_tests +import asyncio import json import os import tempfile + +import pytest + +import litellm +from litellm import ( + RateLimitError, + Timeout, + acompletion, + completion, + completion_cost, + embedding, +) from litellm.llms.vertex_ai import _gemini_convert_messages_with_history +from litellm.tests.test_streaming import streaming_format_tests litellm.num_retries = 3 litellm.cache = None @@ -114,7 +126,8 @@ async def test_get_response(): ], ) return response - + except litellm.RateLimitError: + pass except litellm.UnprocessableEntityError as e: pass except Exception as e: