mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-08 06:24:08 +00:00
(test) hf max tokens, temp
This commit is contained in:
@@ -66,25 +66,6 @@ def test_text_completion_basic():
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_text_completion_basic()
|
||||
|
||||
# def test_completion_hf_prompt_array():
|
||||
# try:
|
||||
# litellm.set_verbose=False
|
||||
# print("\n testing hf mistral\n")
|
||||
# response = text_completion(
|
||||
# model="huggingface/mistralai/Mistral-7B-v0.1",
|
||||
# prompt=token_prompt, # token prompt is a 2d list,
|
||||
# max_tokens=0.0
|
||||
# )
|
||||
# print("\n\n response")
|
||||
|
||||
# print(response)
|
||||
# print(response.choices)
|
||||
# assert(len(response.choices)==2)
|
||||
# # response_str = response["choices"][0]["text"]
|
||||
# except Exception as e:
|
||||
# pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_hf_prompt_array()
|
||||
|
||||
|
||||
def test_completion_text_003_prompt_array():
|
||||
try:
|
||||
@@ -119,4 +100,26 @@ def test_completion_text_003_prompt_array():
|
||||
# print(response)
|
||||
# except Exception as e:
|
||||
# pytest.fail(f"Error occurred: {e}")
|
||||
# test_text_completion_with_proxy()
|
||||
# test_text_completion_with_proxy()
|
||||
|
||||
##### hugging face tests
|
||||
def test_completion_hf_prompt_array():
|
||||
try:
|
||||
litellm.set_verbose=False
|
||||
print("\n testing hf mistral\n")
|
||||
response = text_completion(
|
||||
model="huggingface/mistralai/Mistral-7B-v0.1",
|
||||
prompt=token_prompt, # token prompt is a 2d list,
|
||||
max_tokens=0,
|
||||
temperature=0.0
|
||||
echo=True,
|
||||
)
|
||||
print("\n\n response")
|
||||
|
||||
print(response)
|
||||
print(response.choices)
|
||||
assert(len(response.choices)==2)
|
||||
# response_str = response["choices"][0]["text"]
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_hf_prompt_array()
|
||||
Reference in New Issue
Block a user