feat: 支持反向代理

This commit is contained in:
Rock Chin
2023-03-26 13:50:43 +00:00
parent 17e293afe8
commit 66b5b75631
2 changed files with 21 additions and 1 deletions

View File

@@ -194,6 +194,11 @@ def start(first_time_init=False):
pkg.openai.dprompt.register_all()
# 配置openai api_base
if "reverse_proxy" in config.openai_config and config.openai_config["reverse_proxy"] is not None:
import openai
openai.api_base = config.openai_config["reverse_proxy"]
# 主启动流程
database = pkg.database.manager.DatabaseManager()