mirror of
https://github.com/snailyp/gemini-balance.git
synced 2026-05-11 18:09:55 +08:00
30 lines
832 B
Python
30 lines
832 B
Python
from pydantic_settings import BaseSettings
|
|
from typing import List
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
API_KEYS: List[str]
|
|
ALLOWED_TOKENS: List[str]
|
|
BASE_URL: str = "https://generativelanguage.googleapis.com/v1beta"
|
|
MODEL_SEARCH: List[str] = ["gemini-2.0-flash-exp"]
|
|
TOOLS_CODE_EXECUTION_ENABLED: bool = False
|
|
SHOW_SEARCH_LINK: bool = True
|
|
SHOW_THINKING_PROCESS: bool = True
|
|
AUTH_TOKEN: str = ""
|
|
MAX_FAILURES: int = 3
|
|
PAID_KEY: str = ""
|
|
CREATE_IMAGE_MODEL: str = "imagen-3.0-generate-002"
|
|
UPLOAD_PROVIDER: str = "smms"
|
|
SMMS_SECRET_TOKEN: str = ""
|
|
|
|
def __init__(self):
|
|
super().__init__()
|
|
if not self.AUTH_TOKEN:
|
|
self.AUTH_TOKEN = self.ALLOWED_TOKENS[0] if self.ALLOWED_TOKENS else ""
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
|
|
|
|
settings = Settings()
|