huggeu commited on
Commit
adbb407
·
verified ·
1 Parent(s): b3e3b9b

Upload 2 files

Browse files
Files changed (2) hide show
  1. .env +20 -0
  2. config.json +72 -0
.env ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # DS2API runtime
2
+ # Runtime listen port inside the app/container
3
+ PORT=5001
4
+ # Docker Compose host port (compose only; container still listens on PORT)
5
+ DS2API_HOST_PORT=6011
6
+ LOG_LEVEL=INFO
7
+
8
+ # Admin authentication
9
+ DS2API_ADMIN_KEY=change-me
10
+
11
+ # Config loading (choose one)
12
+ # 1) file-based config
13
+ DS2API_CONFIG_PATH=/app/config.json
14
+ # 2) inline JSON or Base64 JSON
15
+ # DS2API_CONFIG_JSON=
16
+ # 3) legacy compatibility alias
17
+ # CONFIG_JSON=
18
+
19
+ # Optional: static admin assets path
20
+ # DS2API_STATIC_ADMIN_DIR=/app/static/admin
config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_comment": "DS2API 配置文件示例 - 复制为 config.json 使用",
3
+ "_doc": "详细文档: https://github.com/CJackHwang/ds2api",
4
+ "keys": [
5
+ "your-api-key-1",
6
+ "your-api-key-2"
7
+ ],
8
+ "api_keys": [
9
+ {
10
+ "key": "your-api-key-1",
11
+ "name": "主 API Key",
12
+ "remark": "给 OpenAI 客户端使用"
13
+ },
14
+ {
15
+ "key": "your-api-key-2",
16
+ "name": "备用 API Key",
17
+ "remark": "压测或临时调试"
18
+ }
19
+ ],
20
+ "accounts": [
21
+ {
22
+ "_comment": "邮箱登录方式",
23
+ "name": "主账号",
24
+ "remark": "优先用于生产流量",
25
+ "email": "example1@example.com",
26
+ "password": "your-password-1"
27
+ },
28
+ {
29
+ "_comment": "邮箱登录方式 - 账号2",
30
+ "name": "备用账号",
31
+ "email": "example2@example.com",
32
+ "password": "your-password-2"
33
+ },
34
+ {
35
+ "_comment": "手机号登录方式(中国大陆)",
36
+ "mobile": "12345678901",
37
+ "password": "your-password-3"
38
+ }
39
+ ],
40
+ "model_aliases": {
41
+ "gpt-4o": "deepseek-v4-flash",
42
+ "gpt-5.5": "deepseek-v4-flash",
43
+ "gpt-5.3-codex": "deepseek-v4-pro",
44
+ "o3": "deepseek-v4-pro"
45
+ },
46
+ "responses": {
47
+ "store_ttl_seconds": 900
48
+ },
49
+ "current_input_file": {
50
+ "enabled": true,
51
+ "min_chars": 0
52
+ },
53
+ "thinking_injection": {
54
+ "enabled": true,
55
+ "prompt": ""
56
+ },
57
+ "embeddings": {
58
+ "provider": "deterministic"
59
+ },
60
+ "admin": {
61
+ "jwt_expire_hours": 24
62
+ },
63
+ "runtime": {
64
+ "account_max_inflight": 2,
65
+ "account_max_queue": 0,
66
+ "global_max_inflight": 0,
67
+ "token_refresh_interval_hours": 6
68
+ },
69
+ "auto_delete": {
70
+ "mode": "none"
71
+ }
72
+ }