mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
feat - set budget duration
This commit is contained in:
parent
7ff8204573
commit
bf0c0c08c8
2 changed files with 6 additions and 4 deletions
|
@ -561,7 +561,12 @@ class TeamBase(LiteLLMBase):
|
||||||
metadata: Optional[dict] = None
|
metadata: Optional[dict] = None
|
||||||
tpm_limit: Optional[int] = None
|
tpm_limit: Optional[int] = None
|
||||||
rpm_limit: Optional[int] = None
|
rpm_limit: Optional[int] = None
|
||||||
|
|
||||||
|
# Budget fields
|
||||||
max_budget: Optional[float] = None
|
max_budget: Optional[float] = None
|
||||||
|
budget_duration: Optional[str] = None
|
||||||
|
budget_reset_at: Optional[datetime] = None
|
||||||
|
|
||||||
models: list = []
|
models: list = []
|
||||||
blocked: bool = False
|
blocked: bool = False
|
||||||
|
|
||||||
|
|
|
@ -8033,12 +8033,9 @@ async def new_team(
|
||||||
|
|
||||||
_model_id = model_dict.id
|
_model_id = model_dict.id
|
||||||
|
|
||||||
## ADD TO TEAM TABLE
|
## ADD TO TEAM TABLE -> the user api key settings are overriding the data we passed i
|
||||||
complete_team_data = LiteLLM_TeamTable(
|
complete_team_data = LiteLLM_TeamTable(
|
||||||
**data.json(),
|
**data.json(),
|
||||||
max_parallel_requests=user_api_key_dict.max_parallel_requests,
|
|
||||||
budget_duration=user_api_key_dict.budget_duration,
|
|
||||||
budget_reset_at=user_api_key_dict.budget_reset_at,
|
|
||||||
model_id=_model_id,
|
model_id=_model_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue