mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-10 22:41:41 +00:00
(test) text completion add logprobs to test
This commit is contained in:
parent
9223f7cc7a
commit
e180bba541
1 changed files with 18 additions and 3 deletions
|
|
@ -56,7 +56,7 @@ def test_completion_claude():
|
|||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
test_completion_claude()
|
||||
# test_completion_claude()
|
||||
|
||||
# def test_completion_oobabooga():
|
||||
# try:
|
||||
|
|
@ -402,13 +402,28 @@ def test_completion_openai_prompt_array():
|
|||
try:
|
||||
litellm.set_verbose=False
|
||||
response = text_completion(
|
||||
model="text-davinci-003", prompt=[[3152, 833]], max_tokens=10, logprobs=10
|
||||
model="text-davinci-003", prompt=[[3152, 833]], max_tokens=10, logprobs=10, echo=True
|
||||
)
|
||||
print(response)
|
||||
response_str = response["choices"][0]["text"]
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_openai_prompt_array()
|
||||
test_completion_openai_prompt_array()
|
||||
|
||||
def test_completion_hf_prompt_array():
|
||||
try:
|
||||
litellm.set_verbose=False
|
||||
response = text_completion(
|
||||
model="huggingface/bigcode/starcoder",
|
||||
prompt="good morning",
|
||||
max_tokens=10, logprobs=10,
|
||||
echo=True
|
||||
)
|
||||
print(response)
|
||||
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_openai():
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue