From 8e2216aafe2e498ca27358838cff8b464921e257 Mon Sep 17 00:00:00 2001 From: XiaoRan <86949124+slideslide@users.noreply.github.com> Date: Tue, 2 Jan 2024 13:51:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E8=AE=BE=E7=BD=AE=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=97=B6=E6=98=AF=E5=90=A6=E8=87=AA=E5=8A=A8=E6=89=93?= =?UTF-8?q?=E5=BC=80=E6=B5=8F=E8=A7=88=E5=99=A8=20(#1010)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update presets.py 添加增长后的3.5 turbo * 修复了api-host在DALLE3中的问题 创建了IMAGES_COMPLETION_URL 大幅修改了DALLE3文件 * 允许设置启动时是否自动打开浏览器 增加了一个启动时是否自动打开浏览器的设置 --- ChuanhuChatbot.py | 2 +- config_example.json | 2 ++ modules/config.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChuanhuChatbot.py b/ChuanhuChatbot.py index 0a9a04db..f515fbef 100644 --- a/ChuanhuChatbot.py +++ b/ChuanhuChatbot.py @@ -803,5 +803,5 @@ def create_greeting(request: gr.Request): share=share, auth=auth_from_conf if authflag else None, favicon_path="./web_assets/favicon.ico", - inbrowser=not dockerflag, # 禁止在docker下开启inbrowser + inbrowser=autobrowser and not dockerflag, # 禁止在docker下开启inbrowser ) diff --git a/config_example.json b/config_example.json index 1fc54690..9c4180d1 100644 --- a/config_example.json +++ b/config_example.json @@ -82,4 +82,6 @@ // "server_port": 7860, // 如果要share到gradio,设置为true // "share": false, + //如果不想自动打开浏览器,设置为false + //"autobrowser": false } diff --git a/modules/config.py b/modules/config.py index eb8b1f0f..01cf2166 100644 --- a/modules/config.py +++ b/modules/config.py @@ -24,6 +24,7 @@ "server_name", "server_port", "share", + "autobrowser", "check_update", "latex_delimiters_set", "hide_history_when_not_logged_in", @@ -299,6 +300,7 @@ def update_doc_config(two_column_pdf): logging.error("你填写的默认模型" + default_model + "不存在!请从下面的列表中挑一个填写:" + str(presets.MODELS)) share = config.get("share", False) +autobrowser = config.get("autobrowser", True) # avatar bot_avatar = config.get("bot_avatar", "default")