mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-02 03:55:55 +00:00
perf: webui 文件存在性检查
This commit is contained in:
@@ -6,6 +6,7 @@ import threading
|
||||
import traceback
|
||||
import enum
|
||||
import sys
|
||||
import os
|
||||
|
||||
from ..platform import manager as im_mgr
|
||||
from ..provider.session import sessionmgr as llm_session_mgr
|
||||
@@ -137,6 +138,11 @@ class Application:
|
||||
|
||||
async def print_web_access_info(self):
|
||||
"""打印访问 webui 的提示"""
|
||||
|
||||
if not os.path.exists(os.path.join(".", "web/dist")):
|
||||
self.logger.warning("WebUI 文件缺失,请根据文档获取:https://docs.langbot.app/webui/intro.html")
|
||||
return
|
||||
|
||||
import socket
|
||||
|
||||
host_ip = socket.gethostbyname(socket.gethostname())
|
||||
|
||||
Reference in New Issue
Block a user