mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 03:34:10 +00:00
updating budget manager
This commit is contained in:
parent
7cb96e86b4
commit
d4806cd686
13 changed files with 20 additions and 19 deletions
|
@ -23,8 +23,6 @@ def test_user_budget_enough():
|
|||
"model": "gpt-3.5-turbo",
|
||||
"messages": [{"role": "user", "content": "Hey, how's it going?"}]
|
||||
}
|
||||
model = data["model"]
|
||||
messages = data["messages"]
|
||||
if budget_manager.get_current_cost(user=user) <= budget_manager.get_total_budget(user):
|
||||
response = completion(**data)
|
||||
print(budget_manager.update_cost(completion_obj=response, user=user))
|
||||
|
@ -60,4 +58,6 @@ def test_budget_save_to_disk():
|
|||
|
||||
## Scenario 4: Loading budget from disk
|
||||
def test_budget_load_from_disk():
|
||||
budget_manager_2 = BudgetManager(type="local")
|
||||
budget_manager_2 = BudgetManager(type="local")
|
||||
|
||||
## Scenario 5: Test get model cost from user dict
|
Loading…
Add table
Add a link
Reference in a new issue