From 74906692187e94e0197815e0bdd2ea58255fbb5f Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 12 Aug 2023 17:12:57 -0700 Subject: [PATCH] code cleanup --- litellm/main.py | 2 +- litellm/tests/test_secrets.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/main.py b/litellm/main.py index b0215357e7..bead3e1d86 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -298,7 +298,7 @@ def completion( "total_tokens": prompt_tokens + completion_tokens } response = model_response - elif hugging_face == True or custom_llm_provider == "huggingface": + elif custom_llm_provider == "huggingface": import requests API_URL = f"https://api-inference.huggingface.co/models/{model}" HF_TOKEN = get_secret("HF_TOKEN") diff --git a/litellm/tests/test_secrets.py b/litellm/tests/test_secrets.py index 2a4141bd49..72e1bfb086 100644 --- a/litellm/tests/test_secrets.py +++ b/litellm/tests/test_secrets.py @@ -19,7 +19,7 @@ messages = [{ "content": user_message,"role": "user"}] def test_completion_azure(): try: - response = completion(model="gpt-3.5-turbo", deployment_id="chatgpt-test", messages=messages, azure=True) + response = completion(model="gpt-3.5-turbo", deployment_id="chatgpt-test", messages=messages, custom_llm_provider="azure") # Add any assertions here to check the response print(response) except Exception as e: