mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-20 00:11:50 +00:00
Merge pull request #41640 from BerriAI/litellm_remove_dead_provider_config_test_blocks
chore(tests): remove commented-out hf, petals and vertex ai completion blocks
This commit is contained in:
commit
a7dc6551c0
1 changed files with 0 additions and 89 deletions
|
|
@ -12,36 +12,6 @@ from unittest.mock import AsyncMock, MagicMock, patch
|
|||
import litellm
|
||||
from litellm import RateLimitError, completion
|
||||
|
||||
# Huggingface - Expensive to deploy models and keep them running. Maybe we can try doing this via baseten??
|
||||
# def hf_test_completion_tgi():
|
||||
# litellm.HuggingfaceConfig(max_new_tokens=200)
|
||||
# litellm.set_verbose=True
|
||||
# try:
|
||||
# # OVERRIDE WITH DYNAMIC MAX TOKENS
|
||||
# response_1 = litellm.completion(
|
||||
# model="huggingface/mistralai/Mistral-7B-Instruct-v0.1",
|
||||
# messages=[{ "content": "Hello, how are you?","role": "user"}],
|
||||
# api_base="https://n9ox93a8sv5ihsow.us-east-1.aws.endpoints.huggingface.cloud",
|
||||
# max_tokens=10
|
||||
# )
|
||||
# # Add any assertions here to check the response
|
||||
# print(response_1)
|
||||
# response_1_text = response_1.choices[0].message.content
|
||||
|
||||
# # USE CONFIG TOKENS
|
||||
# response_2 = litellm.completion(
|
||||
# model="huggingface/mistralai/Mistral-7B-Instruct-v0.1",
|
||||
# messages=[{ "content": "Hello, how are you?","role": "user"}],
|
||||
# api_base="https://n9ox93a8sv5ihsow.us-east-1.aws.endpoints.huggingface.cloud",
|
||||
# )
|
||||
# # Add any assertions here to check the response
|
||||
# print(response_2)
|
||||
# response_2_text = response_2.choices[0].message.content
|
||||
|
||||
# assert len(response_2_text) > len(response_1_text)
|
||||
# except Exception as e:
|
||||
# pytest.fail(f"Error occurred: {e}")
|
||||
# hf_test_completion_tgi()
|
||||
|
||||
# Anthropic
|
||||
|
||||
|
|
@ -322,65 +292,6 @@ def aleph_alpha_test_completion():
|
|||
|
||||
# aleph_alpha_test_completion()
|
||||
|
||||
# Petals - calls are too slow, will cause circle ci to fail due to delay. Test locally.
|
||||
# def petals_completion():
|
||||
# litellm.PetalsConfig(max_new_tokens=10)
|
||||
# # litellm.set_verbose=True
|
||||
# try:
|
||||
# # OVERRIDE WITH DYNAMIC MAX TOKENS
|
||||
# response_1 = litellm.completion(
|
||||
# model="petals/petals-team/StableBeluga2",
|
||||
# messages=[{ "content": "Hello, how are you? Be as verbose as possible","role": "user"}],
|
||||
# api_base="https://chat.petals.dev/api/v1/generate",
|
||||
# max_tokens=100
|
||||
# )
|
||||
# response_1_text = response_1.choices[0].message.content
|
||||
# print(f"response_1_text: {response_1_text}")
|
||||
|
||||
# # USE CONFIG TOKENS
|
||||
# response_2 = litellm.completion(
|
||||
# model="petals/petals-team/StableBeluga2",
|
||||
# api_base="https://chat.petals.dev/api/v1/generate",
|
||||
# messages=[{ "content": "Hello, how are you? Be as verbose as possible","role": "user"}],
|
||||
# )
|
||||
# response_2_text = response_2.choices[0].message.content
|
||||
# print(f"response_2_text: {response_2_text}")
|
||||
|
||||
# assert len(response_2_text) < len(response_1_text)
|
||||
# except Exception as e:
|
||||
# pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
# petals_completion()
|
||||
|
||||
# VertexAI
|
||||
# We don't have vertex ai configured for circle ci yet -- need to figure this out.
|
||||
# def vertex_ai_test_completion():
|
||||
# litellm.VertexAIConfig(max_output_tokens=10)
|
||||
# # litellm.set_verbose=True
|
||||
# try:
|
||||
# # OVERRIDE WITH DYNAMIC MAX TOKENS
|
||||
# response_1 = litellm.completion(
|
||||
# model="chat-bison",
|
||||
# messages=[{ "content": "Hello, how are you? Be as verbose as possible","role": "user"}],
|
||||
# max_tokens=100
|
||||
# )
|
||||
# response_1_text = response_1.choices[0].message.content
|
||||
# print(f"response_1_text: {response_1_text}")
|
||||
|
||||
# # USE CONFIG TOKENS
|
||||
# response_2 = litellm.completion(
|
||||
# model="chat-bison",
|
||||
# messages=[{ "content": "Hello, how are you? Be as verbose as possible","role": "user"}],
|
||||
# )
|
||||
# response_2_text = response_2.choices[0].message.content
|
||||
# print(f"response_2_text: {response_2_text}")
|
||||
|
||||
# assert len(response_2_text) < len(response_1_text)
|
||||
# except Exception as e:
|
||||
# pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
# vertex_ai_test_completion()
|
||||
|
||||
# Sagemaker
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue