update webui: 默认对话模式改为 LLM对话;lite 模式下可选模型列表不显示本地模型

This commit is contained in:
liunux4odoo 2023-11-20 16:37:06 +08:00
parent 700c4ad170
commit a9cf191532
1 changed files with 6 additions and 5 deletions

View File

@ -75,7 +75,7 @@ def dialogue_page(api: ApiRequest, is_lite: bool = False):
] ]
dialogue_mode = st.selectbox("请选择对话模式:", dialogue_mode = st.selectbox("请选择对话模式:",
dialogue_modes, dialogue_modes,
index=3, index=0,
on_change=on_mode_change, on_change=on_mode_change,
key="dialogue_mode", key="dialogue_mode",
) )
@ -95,6 +95,7 @@ def dialogue_page(api: ApiRequest, is_lite: bool = False):
running_models = list(api.list_running_models()) running_models = list(api.list_running_models())
available_models = [] available_models = []
config_models = api.list_config_models() config_models = api.list_config_models()
if not is_lite:
for k, v in config_models.get("local", {}).items(): # 列出配置了有效本地路径的模型 for k, v in config_models.get("local", {}).items(): # 列出配置了有效本地路径的模型
if (v.get("model_path_exists") if (v.get("model_path_exists")
and k not in running_models): and k not in running_models):