diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index c4e28b05a5..b872895f98 100644 Binary files a/litellm/__pycache__/utils.cpython-311.pyc and b/litellm/__pycache__/utils.cpython-311.pyc differ diff --git a/litellm/tests/test_model_response_typing/test.py b/litellm/tests/test_model_response_typing/test.py index c1620e9412..12d2b259b3 100644 --- a/litellm/tests/test_model_response_typing/test.py +++ b/litellm/tests/test_model_response_typing/test.py @@ -3,7 +3,7 @@ # BASE_URL = 'http://localhost:8080' # def test_hello_route(): -# data = {"model": "gpt-3.5-turbo", "messages": [{"role": "user", "content": "hey, how's it going?"}]} +# data = {"model": "claude-instant-1", "messages": [{"role": "user", "content": "hey, how's it going?"}]} # headers = {'Content-Type': 'application/json'} # response = requests.get(BASE_URL, headers=headers, data=json.dumps(data)) # print(response.text) diff --git a/litellm/utils.py b/litellm/utils.py index 8646037680..b45418933e 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -440,7 +440,7 @@ def set_callbacks(callback_list): global sentry_sdk_instance, capture_exception, add_breadcrumb, posthog, slack_app, alerts_channel, heliconeLogger, aispendLogger, berrispendLogger, supabaseClient try: for callback in callback_list: - if callback == "sentry": + if callback == "sentry" or "SENTRY_API_URL" in os.environ: try: import sentry_sdk except ImportError: @@ -449,7 +449,7 @@ def set_callbacks(callback_list): import sentry_sdk sentry_sdk_instance = sentry_sdk sentry_trace_rate = os.environ.get("SENTRY_API_TRACE_RATE") if "SENTRY_API_TRACE_RATE" in os.environ else "1.0" - sentry_sdk_instance.init(dsn=os.environ.get("SENTRY_API_URL"), traces_sample_rate=float(os.environ.get("SENTRY_API_TRACE_RATE"))) + sentry_sdk_instance.init(dsn=os.environ.get("SENTRY_API_URL"), traces_sample_rate=float(sentry_trace_rate)) capture_exception = sentry_sdk_instance.capture_exception add_breadcrumb = sentry_sdk_instance.add_breadcrumb elif callback == "posthog": diff --git a/pyproject.toml b/pyproject.toml index 4c1b088a69..dab74454d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "litellm" -version = "0.1.424" +version = "0.1.425" description = "Library to easily interface with LLM API providers" authors = ["BerriAI"] license = "MIT License"