mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 02:34:29 +00:00
update budget manager
This commit is contained in:
parent
b5a83be443
commit
5acd1c9d47
3 changed files with 2 additions and 1 deletions
Binary file not shown.
|
@ -57,6 +57,7 @@ class BudgetManager:
|
|||
else:
|
||||
raise ValueError("""duration needs to be one of ["daily", "weekly", "monthly", "yearly"]""")
|
||||
self.user_dict[user] = {"total_budget": total_budget, "duration": duration_in_days, "created_at": created_at, "last_updated_at": created_at}
|
||||
self._save_data_thread() # [Non-Blocking] Update persistent storage without blocking execution
|
||||
return self.user_dict[user]
|
||||
|
||||
def projected_cost(self, model: str, messages: list, user: str):
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[tool.poetry]
|
||||
name = "litellm"
|
||||
version = "0.1.697"
|
||||
version = "0.1.698"
|
||||
description = "Library to easily interface with LLM API providers"
|
||||
authors = ["BerriAI"]
|
||||
license = "MIT License"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue