forked from phoenix/litellm-mirror
(test) test seed, response format, for gpt-3.5-turbo
This commit is contained in:
parent
7abb65d53f
commit
f026ed4772
1 changed files with 11 additions and 4 deletions
|
@ -434,10 +434,17 @@ def test_completion_openai_with_optional_params():
|
||||||
try:
|
try:
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
response = completion(
|
response = completion(
|
||||||
model="gpt-3.5-turbo",
|
model="gpt-3.5-turbo-1106",
|
||||||
messages=messages,
|
messages=[
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "respond in valid, json - what is the day"
|
||||||
|
}
|
||||||
|
],
|
||||||
temperature=0.5,
|
temperature=0.5,
|
||||||
top_p=0.1,
|
top_p=0.1,
|
||||||
|
seed=12,
|
||||||
|
response_format={ "type": "json_object" }
|
||||||
)
|
)
|
||||||
# Add any assertions here to check the response
|
# Add any assertions here to check the response
|
||||||
print(response)
|
print(response)
|
||||||
|
@ -446,7 +453,7 @@ def test_completion_openai_with_optional_params():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
# test_completion_openai_with_optional_params()
|
test_completion_openai_with_optional_params()
|
||||||
|
|
||||||
def test_completion_openai_litellm_key():
|
def test_completion_openai_litellm_key():
|
||||||
try:
|
try:
|
||||||
|
@ -494,7 +501,7 @@ def test_completion_openrouter1():
|
||||||
print(response)
|
print(response)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
test_completion_openrouter1()
|
# test_completion_openrouter1()
|
||||||
|
|
||||||
def test_completion_hf_model_no_provider():
|
def test_completion_hf_model_no_provider():
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue