mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
code cleanup
This commit is contained in:
parent
4bad9e137f
commit
7490669218
2 changed files with 2 additions and 2 deletions
|
@ -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")
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue