mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
(test) add claude-2.1
This commit is contained in:
parent
07bca4dcb1
commit
219470ed68
1 changed files with 20 additions and 0 deletions
|
@ -59,6 +59,26 @@ def test_completion_claude():
|
|||
|
||||
# test_completion_claude()
|
||||
|
||||
def test_completion_claude2_1():
|
||||
try:
|
||||
print("claude2.1 test request")
|
||||
# test without max tokens
|
||||
response = completion(
|
||||
model="claude-2.1",
|
||||
messages=messages,
|
||||
request_timeout=10,
|
||||
max_tokens=10
|
||||
)
|
||||
# Add any assertions here to check the response
|
||||
print(response)
|
||||
print(response.usage)
|
||||
print(response.usage.completion_tokens)
|
||||
print(response["usage"]["completion_tokens"])
|
||||
# print("new cost tracking")
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
test_completion_claude2_1()
|
||||
|
||||
# def test_completion_oobabooga():
|
||||
# try:
|
||||
# response = completion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue