random qa
This commit is contained in:
@@ -18,16 +18,12 @@ from src.api.apiforgui import (
|
||||
from src.chat.heart_flow.sub_heartflow import ChatState
|
||||
from src.api.basic_info_api import get_all_basic_info # 新增导入
|
||||
|
||||
# import uvicorn
|
||||
# import os
|
||||
|
||||
|
||||
router = APIRouter()
|
||||
|
||||
|
||||
logger = get_logger("api")
|
||||
|
||||
# maiapi = FastAPI()
|
||||
logger.info("麦麦API服务器已启动")
|
||||
graphql_router = GraphQLRouter(schema=None, path="/") # Replace `None` with your actual schema
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from fastapi import HTTPException
|
||||
from rich.traceback import install
|
||||
from src.config.config import Config
|
||||
from src.config.config import get_config_dir, load_config
|
||||
from src.common.logger_manager import get_logger
|
||||
import os
|
||||
|
||||
@@ -14,8 +14,8 @@ async def reload_config():
|
||||
from src.config import config as config_module
|
||||
|
||||
logger.debug("正在重载配置文件...")
|
||||
bot_config_path = os.path.join(Config.get_config_dir(), "bot_config.toml")
|
||||
config_module.global_config = Config.load_config(config_path=bot_config_path)
|
||||
bot_config_path = os.path.join(get_config_dir(), "bot_config.toml")
|
||||
config_module.global_config = load_config(config_path=bot_config_path)
|
||||
logger.debug("配置文件重载成功")
|
||||
return {"status": "reloaded"}
|
||||
except FileNotFoundError as e:
|
||||
|
||||
Reference in New Issue
Block a user