mirror of
https://github.com/RockChinQ/QChatGPT.git
synced 2024-11-16 03:32:33 +08:00
fix: 处理插件 import mirai 时的兼容性问题
This commit is contained in:
parent
3469515e04
commit
c53ffaca6c
|
@ -110,7 +110,7 @@ class Session(pydantic.BaseModel):
|
|||
|
||||
using_conversation: typing.Optional[Conversation] = None
|
||||
|
||||
conversations: typing.Optional[list[Conversation]] = []
|
||||
conversations: typing.Optional[list[Conversation]] = pydantic.Field(default_factory=list)
|
||||
|
||||
create_time: typing.Optional[datetime.datetime] = pydantic.Field(default_factory=datetime.datetime.now)
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
import logging
|
||||
import asyncio
|
||||
import traceback
|
||||
|
@ -15,6 +16,10 @@ from .types import message as platform_message
|
|||
from .types import events as platform_events
|
||||
from .types import entities as platform_entities
|
||||
|
||||
# 处理 3.4 移除了 YiriMirai 之后,插件的兼容性问题
|
||||
from . import types as mirai
|
||||
sys.modules['mirai'] = mirai
|
||||
|
||||
|
||||
# 控制QQ消息输入输出的类
|
||||
class PlatformManager:
|
||||
|
|
Loading…
Reference in New Issue
Block a user