mirror of
https://github.com/langbot-app/LangBot.git
synced 2025-11-25 19:37:36 +08:00
feat: 支持反向代理
This commit is contained in:
5
main.py
5
main.py
@@ -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()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user