mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-28 04:04:31 +00:00
add tests
This commit is contained in:
parent
4177cf7a59
commit
001f37c4f1
1 changed files with 28 additions and 0 deletions
|
@ -218,6 +218,34 @@ def test_completion_claude():
|
||||||
# test_completion_claude()
|
# test_completion_claude()
|
||||||
|
|
||||||
|
|
||||||
|
def test_completion_empower():
|
||||||
|
litellm.set_verbose = True
|
||||||
|
messages = [
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "\nWhat is the query for `console.log` => `console.error`\n",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": "\nThis is the GritQL query for the given before/after examples:\n<gritql>\n`console.log` => `console.error`\n</gritql>\n",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "\nWhat is the query for `console.info` => `consdole.heaven`\n",
|
||||||
|
},
|
||||||
|
]
|
||||||
|
try:
|
||||||
|
# test without max tokens
|
||||||
|
response = completion(
|
||||||
|
model="empower/empower-functions-small",
|
||||||
|
messages=messages,
|
||||||
|
)
|
||||||
|
# Add any assertions, here to check response args
|
||||||
|
print(response)
|
||||||
|
except Exception as e:
|
||||||
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
|
|
||||||
def test_completion_claude_3_empty_response():
|
def test_completion_claude_3_empty_response():
|
||||||
litellm.set_verbose = True
|
litellm.set_verbose = True
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue