mirror of
https://github.com/langgenius/dify.git
synced 2026-09-05 08:48:10 +08:00
refactor(api): type get_knowledge_rate_limit with KnowledgeRateLimitD… (#34483)
This commit is contained in:
parent
4cc5401d7e
commit
affe5ed30b
@ -32,6 +32,11 @@ class SubscriptionPlan(TypedDict):
|
|||||||
expiration_date: int
|
expiration_date: int
|
||||||
|
|
||||||
|
|
||||||
|
class KnowledgeRateLimitDict(TypedDict):
|
||||||
|
limit: int
|
||||||
|
subscription_plan: str
|
||||||
|
|
||||||
|
|
||||||
class BillingService:
|
class BillingService:
|
||||||
base_url = os.environ.get("BILLING_API_URL", "BILLING_API_URL")
|
base_url = os.environ.get("BILLING_API_URL", "BILLING_API_URL")
|
||||||
secret_key = os.environ.get("BILLING_API_SECRET_KEY", "BILLING_API_SECRET_KEY")
|
secret_key = os.environ.get("BILLING_API_SECRET_KEY", "BILLING_API_SECRET_KEY")
|
||||||
@ -58,7 +63,7 @@ class BillingService:
|
|||||||
return usage_info
|
return usage_info
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_knowledge_rate_limit(cls, tenant_id: str):
|
def get_knowledge_rate_limit(cls, tenant_id: str) -> KnowledgeRateLimitDict:
|
||||||
params = {"tenant_id": tenant_id}
|
params = {"tenant_id": tenant_id}
|
||||||
|
|
||||||
knowledge_rate_limit = cls._send_request("GET", "/subscription/knowledge-rate-limit", params=params)
|
knowledge_rate_limit = cls._send_request("GET", "/subscription/knowledge-rate-limit", params=params)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user