fix: 修复官方语言模型切换key时可能发生的死循环问题;修复切换语言模型时前缀不更新的问题

This commit is contained in:
Soulter
2023-04-05 19:10:31 +08:00
parent 06e7753797
commit 762f5ea30f
3 changed files with 20 additions and 17 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ def privider_chooser(cfg):
l.append('rev_ernie')
if 'rev_edgegpt' in cfg and cfg['rev_edgegpt']['enable']:
l.append('rev_edgegpt')
if 'openai' in cfg and len(cfg['openai']['key'])>0:
if 'openai' in cfg and cfg['openai']['key'] != None and len(cfg['openai']['key'])>0:
l.append('openai_official')
return l