fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
33 lines
1.0 KiB
Python
33 lines
1.0 KiB
Python
"""
|
|
Team membership table model.
|
|
|
|
Canonical definition for ``litellm_teammembership``. Re-exported from
|
|
``litellm.proxy._types`` for backwards compatibility.
|
|
"""
|
|
|
|
from typing import Optional, Union
|
|
|
|
from litellm.models.budget import LiteLLM_BudgetTable, LiteLLM_BudgetTableFull
|
|
from litellm.types.llms.base import LiteLLMPydanticObjectBase
|
|
|
|
|
|
class LiteLLM_TeamMembership(LiteLLMPydanticObjectBase):
|
|
user_id: str
|
|
team_id: str
|
|
budget_id: Optional[str] = None
|
|
spend: Optional[float] = 0.0
|
|
total_spend: Optional[float] = 0.0
|
|
litellm_budget_table: Optional[
|
|
Union[LiteLLM_BudgetTableFull, LiteLLM_BudgetTable]
|
|
] = None
|
|
|
|
def safe_get_team_member_rpm_limit(self) -> Optional[int]:
|
|
if self.litellm_budget_table is not None:
|
|
return self.litellm_budget_table.rpm_limit
|
|
return None
|
|
|
|
def safe_get_team_member_tpm_limit(self) -> Optional[int]:
|
|
if self.litellm_budget_table is not None:
|
|
return self.litellm_budget_table.tpm_limit
|
|
return None
|