mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 19:54:13 +00:00
(tests) easily track cost for responses
This commit is contained in:
parent
0069b09caa
commit
e80f07c76a
1 changed files with 3 additions and 1 deletions
|
@ -51,10 +51,12 @@ def test_completion_claude():
|
|||
print(response.usage)
|
||||
print(response.usage.completion_tokens)
|
||||
print(response["usage"]["completion_tokens"])
|
||||
# print("new cost tracking")
|
||||
print(response.cost())
|
||||
except Exception as e:
|
||||
pytest.fail(f"Error occurred: {e}")
|
||||
|
||||
# test_completion_claude()
|
||||
test_completion_claude()
|
||||
|
||||
# def test_completion_oobabooga():
|
||||
# try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue