From d00d687b9143c21f03da532deaadd0c5e85214fc Mon Sep 17 00:00:00 2001 From: zhongcheng Date: Wed, 4 Mar 2026 17:50:32 +0800 Subject: [PATCH] add env config --- .env-example | 18 ++++++++++++++++++ app/config.py | 4 ++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 .env-example diff --git a/.env-example b/.env-example new file mode 100644 index 0000000..63cd9c9 --- /dev/null +++ b/.env-example @@ -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 + diff --git a/app/config.py b/app/config.py index 4a9fda3..380d77b 100644 --- a/app/config.py +++ b/app/config.py @@ -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"