mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
Addressing linting issues
This commit is contained in:
parent
d62dfd4be2
commit
09afe14a5f
3 changed files with 26 additions and 6 deletions
|
|
@ -2600,6 +2600,7 @@ class SpendLogsPayload(TypedDict):
|
|||
cache_key: str
|
||||
request_tags: str # json str
|
||||
team_id: Optional[str]
|
||||
organization_id: Optional[str]
|
||||
end_user: Optional[str]
|
||||
requester_ip_address: Optional[str]
|
||||
custom_llm_provider: Optional[str]
|
||||
|
|
|
|||
|
|
@ -972,6 +972,20 @@ class DBSpendUpdateWriter:
|
|||
) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def _update_daily_spend(
|
||||
n_retry_times: int,
|
||||
prisma_client: PrismaClient,
|
||||
proxy_logging_obj: ProxyLogging,
|
||||
daily_spend_transactions: Dict[str, DailyOrganizationSpendTransaction],
|
||||
entity_type: Literal["org"],
|
||||
entity_id_field: str,
|
||||
table_name: str,
|
||||
unique_constraint_name: str,
|
||||
) -> None:
|
||||
...
|
||||
|
||||
@overload
|
||||
@staticmethod
|
||||
async def _update_daily_spend(
|
||||
|
|
@ -1430,9 +1444,16 @@ class DBSpendUpdateWriter:
|
|||
)
|
||||
return
|
||||
|
||||
# Inject org_id for daily aggregation check
|
||||
payload_with_org: SpendLogsPayload = dict(payload)
|
||||
payload_with_org["organization_id"] = org_id
|
||||
print("org_id", org_id)
|
||||
print("payload", payload)
|
||||
|
||||
payload_with_org = cast(
|
||||
SpendLogsPayload,
|
||||
{
|
||||
**payload,
|
||||
"organization_id": org_id,
|
||||
},
|
||||
)
|
||||
|
||||
base_daily_transaction = (
|
||||
await self._common_add_spend_log_transaction_to_daily_transaction(
|
||||
|
|
|
|||
|
|
@ -281,10 +281,8 @@ async def get_organization_daily_activity(
|
|||
"""
|
||||
from litellm.proxy.proxy_server import (
|
||||
prisma_client,
|
||||
proxy_logging_obj,
|
||||
user_api_key_cache,
|
||||
)
|
||||
|
||||
|
||||
if prisma_client is None:
|
||||
raise HTTPException(
|
||||
status_code=500,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue