mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
(test) cleanup remove text_completion testing from completion()
This commit is contained in:
parent
0fa7c1ec3a
commit
b8d0a0fbd1
1 changed files with 1 additions and 39 deletions
|
|
@ -10,7 +10,7 @@ sys.path.insert(
|
|||
) # Adds the parent directory to the system path
|
||||
import pytest
|
||||
import litellm
|
||||
from litellm import embedding, completion, text_completion, completion_cost
|
||||
from litellm import embedding, completion, completion_cost
|
||||
from litellm import RateLimitError
|
||||
|
||||
user_message = "Write a short poem about the sky"
|
||||
|
|
@ -387,44 +387,6 @@ def test_completion_openai():
|
|||
pytest.fail(f"Error occurred: {e}")
|
||||
# test_completion_openai()
|
||||
|
||||
|
||||
def test_completion_openai_prompt():
|
||||
try:
|
||||
response = text_completion(
|
||||
model="gpt-3.5-turbo", prompt="What's the weather in SF?"
|
||||
)
|
||||
response_str = response["choices"][0]["text"]
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
|
||||
def test_completion_openai_prompt_array():
|
||||
try:
|
||||
litellm.set_verbose=False
|
||||
response = text_completion(
|
||||
model="text-davinci-003", 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_openai_prompt_array()
|
||||
|
||||
def test_completion_hf_prompt_array():
|
||||
try:
|
||||
litellm.set_verbose=False
|
||||
response = text_completion(
|
||||
model="huggingface/bigcode/starcoder",
|
||||
prompt=[[33074, 25, 1374],[284, 651, 284, 479, 17716, 322, 13, 25750]],
|
||||
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:
|
||||
response = completion(model="gpt-3.5-turbo-instruct", messages=messages)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue