Skip to content

Commit

Permalink
perf: webui 文件存在性检查
Browse files Browse the repository at this point in the history
  • Loading branch information
RockChinQ committed Nov 17, 2024
1 parent c51eac7 commit 83e80f3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/core/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import traceback
import enum
import sys
import os

from ..platform import manager as im_mgr
from ..provider.session import sessionmgr as llm_session_mgr
Expand Down Expand Up @@ -137,6 +138,11 @@ async def never_ending():

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())
Expand Down

0 comments on commit 83e80f3

Please sign in to comment.