johnsmith253325 commited on
Commit
2a7a9d4
·
2 Parent(s): 4cae7cc 3de6909

Merge branch 'main' of https://github.com/GaiZhenbiao/ChuanhuChatGPT

Browse files
config_example.json CHANGED
@@ -64,6 +64,7 @@
64
  //== 高级配置 ==
65
  // 是否多个API Key轮换使用
66
  "multi_api_key": false,
 
67
  // "available_models": ["GPT3.5 Turbo", "GPT4 Turbo", "GPT4 Vision"], // 可用的模型列表,将覆盖默认的可用模型列表
68
  // "extra_models": ["模型名称3", "模型名称4", ...], // 额外的模型,将添加到可用的模型列表之后
69
  // "api_key_list": [
 
64
  //== 高级配置 ==
65
  // 是否多个API Key轮换使用
66
  "multi_api_key": false,
67
+ "hide_my_key": false, // 如果你想在UI中隐藏 API 密钥输入框,将此值设置为 true
68
  // "available_models": ["GPT3.5 Turbo", "GPT4 Turbo", "GPT4 Vision"], // 可用的模型列表,将覆盖默认的可用模型列表
69
  // "extra_models": ["模型名称3", "模型名称4", ...], // 额外的模型,将添加到可用的模型列表之后
70
  // "api_key_list": [
modules/config.py CHANGED
@@ -29,6 +29,7 @@ __all__ = [
29
  "default_chuanhu_assistant_model",
30
  "show_api_billing",
31
  "chat_name_method_index",
 
32
  ]
33
 
34
  # 添加一个统一的config文件,避免文件过多造成的疑惑(优先级最低)
@@ -103,6 +104,8 @@ if "extra_models" in config:
103
  presets.MODELS.extend(config["extra_models"])
104
  logging.info(f"已添加额外的模型:{config['extra_models']}")
105
 
 
 
106
  google_palm_api_key = config.get("google_palm_api_key", "")
107
  google_palm_api_key = os.environ.get(
108
  "GOOGLE_PALM_API_KEY", google_palm_api_key)
 
29
  "default_chuanhu_assistant_model",
30
  "show_api_billing",
31
  "chat_name_method_index",
32
+ "HIDE_MY_KEY",
33
  ]
34
 
35
  # 添加一个统一的config文件,避免文件过多造成的疑惑(优先级最低)
 
104
  presets.MODELS.extend(config["extra_models"])
105
  logging.info(f"已添加额外的模型:{config['extra_models']}")
106
 
107
+ HIDE_MY_KEY = config.get("hide_my_key", False)
108
+
109
  google_palm_api_key = config.get("google_palm_api_key", "")
110
  google_palm_api_key = os.environ.get(
111
  "GOOGLE_PALM_API_KEY", google_palm_api_key)
modules/presets.py CHANGED
@@ -39,7 +39,6 @@ TIMEOUT_STREAMING = 60 # 流式对话时的超时时间
39
  TIMEOUT_ALL = 200 # 非流式对话时的超时时间
40
  ENABLE_STREAMING_OPTION = True # 是否启用选择选择是否实时显示回答的勾选框
41
  ENABLE_LLM_NAME_CHAT_OPTION = True # 是否启用选择是否使用LLM模型的勾选框
42
- HIDE_MY_KEY = False # 如果你想在UI中隐藏你的 API 密钥,将此值设置为 True
43
  CONCURRENT_COUNT = 100 # 允许同时使用的用户数量
44
 
45
  SIM_K = 5
 
39
  TIMEOUT_ALL = 200 # 非流式对话时的超时时间
40
  ENABLE_STREAMING_OPTION = True # 是否启用选择选择是否实时显示回答的勾选框
41
  ENABLE_LLM_NAME_CHAT_OPTION = True # 是否启用选择是否使用LLM模型的勾选框
 
42
  CONCURRENT_COUNT = 100 # 允许同时使用的用户数量
43
 
44
  SIM_K = 5
web_assets/stylesheet/ChuanhuChat.css CHANGED
@@ -144,6 +144,12 @@ body.popup-open {
144
  right: max(24px, env(safe-area-inset-right));
145
  }
146
  }
 
 
 
 
 
 
147
  #status-display p {
148
  font-size: .85em;
149
  font-family: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", "Microsoft Yahei UI", "Microsoft Yahei", monospace;
@@ -1094,7 +1100,7 @@ input:checked + .chatbot-input-more-span {
1094
  display: block;
1095
  }
1096
 
1097
- .disable-update .show-on-latest, .disable-update .show-on-outdated {
1098
  display: none;
1099
  }
1100
 
 
144
  right: max(24px, env(safe-area-inset-right));
145
  }
146
  }
147
+ #chuanhu-header > #status-display #status-display {
148
+ min-height: unset;
149
+ }
150
+ #chuanhu-header > #status-display > .wrap {
151
+ margin-top: 8px;
152
+ }
153
  #status-display p {
154
  font-size: .85em;
155
  font-family: ui-monospace, "SF Mono", "SFMono-Regular", "Menlo", "Consolas", "Liberation Mono", "Microsoft Yahei UI", "Microsoft Yahei", monospace;
 
1100
  display: block;
1101
  }
1102
 
1103
+ .disable-update #chuanhu-manual-check-btn {
1104
  display: none;
1105
  }
1106