ZyphrZero commited on
Commit
9730d78
·
1 Parent(s): 61703b7

refactor(config): 移除 API_ENDPOINT 配置项

Browse files

- 从 .env.example 和 README.md 中删除 API_ENDPOINT 配置说明
- 在 app/core/config.py 中将 API_ENDPOINT 的默认值硬编码

Files changed (3) hide show
  1. .env.example +0 -3
  2. README.md +0 -1
  3. app/core/config.py +1 -1
.env.example CHANGED
@@ -2,9 +2,6 @@
2
  # 复制此文件为 .env 并根据需要修改配置值
3
 
4
  # ========== API 基础配置 ==========
5
- # Z.ai API 端点地址
6
- API_ENDPOINT=https://chat.z.ai/api/chat/completions
7
-
8
  # 客户端认证密钥(您自定义的 API 密钥,用于客户端访问本服务)
9
  AUTH_TOKEN=sk-your-api-key
10
 
 
2
  # 复制此文件为 .env 并根据需要修改配置值
3
 
4
  # ========== API 基础配置 ==========
 
 
 
5
  # 客户端认证密钥(您自定义的 API 密钥,用于客户端访问本服务)
6
  AUTH_TOKEN=sk-your-api-key
7
 
README.md CHANGED
@@ -148,7 +148,6 @@ for chunk in response:
148
  | 变量名 | 默认值 | 说明 |
149
  | --------------------- | ----------------------------------------- | ---------------------- |
150
  | `AUTH_TOKEN` | `sk-your-api-key` | 客户端认证密钥 |
151
- | `API_ENDPOINT` | `https://chat.z.ai/api/chat/completions` | 上游 API 地址 |
152
  | `LISTEN_PORT` | `8080` | 服务监听端口 |
153
  | `DEBUG_LOGGING` | `true` | 调试日志开关 |
154
  | `ANONYMOUS_MODE` | `true` | 匿名用户模式开关 |
 
148
  | 变量名 | 默认值 | 说明 |
149
  | --------------------- | ----------------------------------------- | ---------------------- |
150
  | `AUTH_TOKEN` | `sk-your-api-key` | 客户端认证密钥 |
 
151
  | `LISTEN_PORT` | `8080` | 服务监听端口 |
152
  | `DEBUG_LOGGING` | `true` | 调试日志开关 |
153
  | `ANONYMOUS_MODE` | `true` | 匿名用户模式开关 |
app/core/config.py CHANGED
@@ -11,7 +11,7 @@ class Settings(BaseSettings):
11
  """Application settings"""
12
 
13
  # API Configuration
14
- API_ENDPOINT: str = os.getenv("API_ENDPOINT", "https://chat.z.ai/api/chat/completions")
15
  AUTH_TOKEN: str = os.getenv("AUTH_TOKEN", "sk-your-api-key")
16
 
17
  # 认证token文件路径
 
11
  """Application settings"""
12
 
13
  # API Configuration
14
+ API_ENDPOINT: str = "https://chat.z.ai/api/chat/completions"
15
  AUTH_TOKEN: str = os.getenv("AUTH_TOKEN", "sk-your-api-key")
16
 
17
  # 认证token文件路径