Tuchuanhuhuhu Keldos commited on
Commit
d40c369
·
1 Parent(s): cd3a175

为JSON文件添加注释,默认不启用HTTP代理

Browse files

原始commit: 7139ba41b187fa0b948eb4917eec59c77b3b6b51

Co-authored-by: Keldos <[email protected]>

Files changed (3) hide show
  1. config_example.json +9 -3
  2. modules/config.py +1 -1
  3. requirements.txt +1 -0
config_example.json CHANGED
@@ -1,14 +1,20 @@
1
  {
 
 
2
  "openai_api_key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxx",
3
- "https_proxy": "http://127.0.0.1:1079",
4
- "http_proxy": "http://127.0.0.1:1079",
5
- "users": [],
 
6
  "advance_docs": {
7
  "pdf": {
 
8
  "two_column": false,
 
9
  "formula_ocr": true
10
  }
11
  },
 
12
  "multi_api_key": false,
13
  "api_key_list": [
14
  "sk-xxxxxxxxxxxxxxxxxxxxxxxx1",
 
1
  {
2
+ // 你的OpenAI API Key,一般必填,
3
+ // 若缺省填为 "openai_api_key": "" 则必须再在图形界面中填入API Key
4
  "openai_api_key": "sk-xxxxxxxxxxxxxxxxxxxxxxxxx",
5
+ // 如果使用代理,请取消注释下面的两行,并替换代理URL
6
+ // "https_proxy": "http://127.0.0.1:1079",
7
+ // "http_proxy": "http://127.0.0.1:1079",
8
+ "users": [],
9
  "advance_docs": {
10
  "pdf": {
11
+ // 是否认为PDF是双栏的
12
  "two_column": false,
13
+ // 是否使用OCR识别PDF中的公式
14
  "formula_ocr": true
15
  }
16
  },
17
+ // 是否多个API Key轮换使用
18
  "multi_api_key": false,
19
  "api_key_list": [
20
  "sk-xxxxxxxxxxxxxxxxxxxxxxxx1",
modules/config.py CHANGED
@@ -3,7 +3,7 @@ from contextlib import contextmanager
3
  import os
4
  import logging
5
  import sys
6
- import json
7
 
8
  from . import shared
9
 
 
3
  import os
4
  import logging
5
  import sys
6
+ import commentjson as json
7
 
8
  from . import shared
9
 
requirements.txt CHANGED
@@ -13,3 +13,4 @@ markdown
13
  PyPDF2
14
  pdfplumber
15
  pandas
 
 
13
  PyPDF2
14
  pdfplumber
15
  pandas
16
+ commentjson