结构调整
视频解析多图/多媒体结构 消息体适配
This commit is contained in:
@@ -7,7 +7,7 @@ require("nonebot_plugin_orm")
|
||||
|
||||
from .config import NICKNAME, config_manager, register_config as _register_learning_config # noqa: E402
|
||||
from . import web_hub # noqa: E402
|
||||
from hexi.web_plugin_registry import register_web_plugin # noqa: E402
|
||||
from hexi.web_hub.web_plugin_registry import register_web_plugin # noqa: E402
|
||||
|
||||
# 注册到统一 Web 管理台(/hub):hub 启动时挂载 /api/learning_chat
|
||||
register_web_plugin(
|
||||
|
||||
@@ -113,7 +113,7 @@ def register_config() -> None:
|
||||
getter/setter 直接读写 config_manager.config,并保存到 learning_chat.yml。
|
||||
权威源是插件自身的 yml,故 nosave 不写入 plugin_config.json。
|
||||
"""
|
||||
from hexi.config_standard import register_config_items
|
||||
from hexi.web_hub.config_standard import register_config_items
|
||||
|
||||
def _get(key):
|
||||
return getattr(config_manager.config, key)
|
||||
|
||||
@@ -6,7 +6,7 @@ import time
|
||||
from dataclasses import dataclass
|
||||
from functools import cached_property, cmp_to_key
|
||||
|
||||
# from ..nonebot_plugin_hexi_core.MessageUtils import send_poke
|
||||
# from ..core.MessageUtils import send_poke
|
||||
|
||||
try:
|
||||
import jieba_fast.analyse as jieba_analyse
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""群聊学习 Web API 子应用(挂载到 /api/learning_chat)。
|
||||
|
||||
统一鉴权走 hexi.web_auth(OAuth2 + SQLite),与统一管理台 /hub 共用登录态。
|
||||
统一鉴权走 hexi.web_hub.web_auth(OAuth2 + SQLite),与统一管理台 /hub 共用登录态。
|
||||
前端由统一管理台 hexi/web 渲染。
|
||||
"""
|
||||
|
||||
@@ -22,7 +22,7 @@ from nonebot import get_adapter
|
||||
from nonebot.adapters.onebot.v11 import Adapter
|
||||
from nonebot_plugin_orm import get_session
|
||||
|
||||
from hexi.web_auth import require_admin
|
||||
from hexi.web_hub.web_auth import require_admin
|
||||
|
||||
from .services.learn import LearningChat
|
||||
from .models import ChatMessage, ChatContext, ChatAnswer, ChatBlackList
|
||||
|
||||
Reference in New Issue
Block a user