Skip to content

Commit

Permalink
Merge pull request #777 from Ikaros-521/owner
Browse files Browse the repository at this point in the history
针对能自定义的下拉选择框,在自定义输入后,重启webui后配置为空的问题,实现追加自定义选项的功能
  • Loading branch information
Ikaros-521 authored Apr 25, 2024
2 parents 8b61000 + 1c86699 commit 4ff6c26
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3260,6 +3260,9 @@ def save_config():
"qwen",
"qwen:1.8b-chat"
]
# 将用户配置的值插入list(如果不存在)
if config.get("chatgpt", "model") not in chatgpt_models:
chatgpt_models.append(config.get("chatgpt", "model"))
data_json = {}
for line in chatgpt_models:
data_json[line] = line
Expand Down

0 comments on commit 4ff6c26

Please sign in to comment.