add env config

This commit is contained in:
2026-03-04 17:50:32 +08:00
parent 32054469d7
commit d00d687b91
2 changed files with 20 additions and 2 deletions

18
.env-example Normal file
View File

@@ -0,0 +1,18 @@
# AI项目配置文件
# API配置
API_KEY=
MODEL=
BASE_URL=
# FastAPI 配置
FASTAPI_HOST=0.0.0.0
FASTAPI_PORT=8000
FASTAPI_DEBUG=True
# LangGraph 配置
LANGGRAPH_DEBUG=False
# 项目信息
PROJECT_NAME=AI Agent Project
PROJECT_VERSION=0.1.0

View File

@@ -11,8 +11,8 @@ class Settings(BaseSettings):
# API 配置
api_key: str
model: str = "gemini-3.1-flash"
base_url: str = "https://generativelanguage.googleapis.com/v1beta/openai/"
model: str
base_url: str
# FastAPI 配置
fastapi_host: str = "0.0.0.0"