mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix(proxy/utils.py): fix model dump to exclude none values
This commit is contained in:
parent
f9034ffcee
commit
65097d595c
3 changed files with 7 additions and 2 deletions
|
|
@ -175,7 +175,7 @@ export PROXY_LOGOUT_URL="https://www.google.com"
|
|||
|
||||
### Set max budget for internal users
|
||||
|
||||
Automatically apply budget per internal user when they sign up
|
||||
Automatically apply budget per internal user when they sign up. By default the table will be checked every 10 minutes, for users to reset. To modify this, [see this](./users.md#reset-budgets)
|
||||
|
||||
```yaml
|
||||
litellm_settings:
|
||||
|
|
|
|||
|
|
@ -12,5 +12,8 @@ litellm_settings:
|
|||
max_internal_user_budget: 0.00001
|
||||
internal_user_budget_duration: "3s" # reset every 3seconds
|
||||
|
||||
general_settings:
|
||||
proxy_budget_rescheduler_min_time: 1
|
||||
proxy_budget_rescheduler_max_time: 2
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1853,7 +1853,9 @@ class PrismaClient:
|
|||
batcher = self.db.batch_()
|
||||
for idx, user in enumerate(data_list):
|
||||
try:
|
||||
data_json = self.jsonify_object(data=user.model_dump())
|
||||
data_json = self.jsonify_object(
|
||||
data=user.model_dump(exclude_none=True)
|
||||
)
|
||||
except:
|
||||
data_json = self.jsonify_object(data=user.dict())
|
||||
batcher.litellm_usertable.upsert(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue