Files
aiagent/backend/app/core/config.py
2026-01-19 00:09:36 +08:00

48 lines
1.3 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
应用配置
"""
from pydantic_settings import BaseSettings
from typing import List
class Settings(BaseSettings):
"""应用设置"""
# 应用基本信息
APP_NAME: str = "低代码智能体平台"
APP_VERSION: str = "1.0.0"
DEBUG: bool = True
SECRET_KEY: str = "dev-secret-key-change-in-production"
# 数据库配置MySQL
DATABASE_URL: str = "mysql+pymysql://root:!Rjb12191@gz-cynosdbmysql-grp-d26pzce5.sql.tencentcdb.com:24936/agent_db?charset=utf8mb4"
# Redis配置
REDIS_URL: str = "redis://localhost:6379/0"
# CORS配置支持字符串或列表
CORS_ORIGINS: str = "http://localhost:3000,http://127.0.0.1:3000,http://localhost:8038,http://101.43.95.130:8038"
# OpenAI配置
OPENAI_API_KEY: str = ""
OPENAI_BASE_URL: str = "https://api.openai.com/v1"
# DeepSeek配置
DEEPSEEK_API_KEY: str = ""
DEEPSEEK_BASE_URL: str = "https://api.deepseek.com"
# Anthropic配置
ANTHROPIC_API_KEY: str = ""
# JWT配置
JWT_SECRET_KEY: str = "dev-jwt-secret-key-change-in-production"
JWT_ALGORITHM: str = "HS256"
JWT_ACCESS_TOKEN_EXPIRE_MINUTES: int = 30
class Config:
env_file = ".env"
case_sensitive = True
settings = Settings()