FastAPI + Celery + Next.js + Postgres/Redis app with company monitoring, source collection, LLM-based change analysis, enrichment, and account security (Turnstile, escalating lockout, email verification).
21 lines
489 B
Python
21 lines
489 B
Python
from __future__ import annotations
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class UserApiKeyStatus(BaseModel):
|
|
provider: str
|
|
label: str
|
|
configured: bool
|
|
value: str | None
|
|
credits: int | None
|
|
credits_note: str | None
|
|
free: bool
|
|
requires_government_id: bool
|
|
|
|
|
|
class SetUserApiKeyRequest(BaseModel):
|
|
# Blank clears the user's override, falling back to the server's
|
|
# global key for that provider again.
|
|
key: str = Field(default="", max_length=500)
|