From ee93fd86360951d05e8259731ad4aae0915464a4 Mon Sep 17 00:00:00 2001 From: RockChinQ <1010553892@qq.com> Date: Tue, 20 Feb 2024 11:47:04 +0800 Subject: [PATCH] =?UTF-8?q?hotfix:=20=E9=92=88=E5=AF=B9python3.9=E7=9A=84?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg/command/operator.py | 2 +- pkg/plugin/events.py | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/command/operator.py b/pkg/command/operator.py index 48ca8daf..1247aa09 100644 --- a/pkg/command/operator.py +++ b/pkg/command/operator.py @@ -53,7 +53,7 @@ class CommandOperator(metaclass=abc.ABCMeta): usage: str = None - parent_class: typing.Type[CommandOperator] | None = None + parent_class: typing.Union[typing.Type[CommandOperator], None] = None """父节点类。标记以供管理器在初始化时编织父子关系。""" lowest_privilege: int = 0 diff --git a/pkg/plugin/events.py b/pkg/plugin/events.py index d414dafb..fe67a82d 100644 --- a/pkg/plugin/events.py +++ b/pkg/plugin/events.py @@ -11,7 +11,7 @@ from ..provider import entities as llm_entities class BaseEventModel(pydantic.BaseModel): - query: core_entities.Query | None + query: typing.Union[core_entities.Query, None] class Config: arbitrary_types_allowed = True diff --git a/requirements.txt b/requirements.txt index 9ddd53fb..e74eb53a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ requests -openai +openai>1.0.0 colorlog~=6.6.0 yiri-mirai-rc aiocqhttp