mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
(v0) fix
This commit is contained in:
parent
4c69efac8a
commit
a9338d22eb
1 changed files with 3 additions and 1 deletions
|
@ -506,7 +506,9 @@ async def track_cost_callback(
|
|||
if user_api_key and (
|
||||
prisma_client is not None or custom_db_client is not None
|
||||
):
|
||||
await update_database(token=user_api_key, response_cost=response_cost)
|
||||
await update_database(
|
||||
token=user_api_key, response_cost=response_cost, user_id=user_id
|
||||
)
|
||||
elif kwargs["stream"] == False: # for non streaming responses
|
||||
response_cost = litellm.completion_cost(
|
||||
completion_response=completion_response
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue