新增接口
This commit is contained in:
@@ -80,4 +80,10 @@ class ClassicalWillingManager(BaseWillingManager):
|
|||||||
async def not_reply_handle(self, message_id):
|
async def not_reply_handle(self, message_id):
|
||||||
return await super().not_reply_handle(message_id)
|
return await super().not_reply_handle(message_id)
|
||||||
|
|
||||||
|
async def get_variable_parameters(self):
|
||||||
|
return await super().get_variable_parameters()
|
||||||
|
|
||||||
|
async def set_variable_parameters(self, parameters):
|
||||||
|
return await super().set_variable_parameters(parameters)
|
||||||
|
|
||||||
|
|
||||||
@@ -241,3 +241,8 @@ class DynamicWillingManager(BaseWillingManager):
|
|||||||
async def after_generate_reply_handle(self, message_id):
|
async def after_generate_reply_handle(self, message_id):
|
||||||
return await super().after_generate_reply_handle(message_id)
|
return await super().after_generate_reply_handle(message_id)
|
||||||
|
|
||||||
|
async def get_variable_parameters(self):
|
||||||
|
return await super().get_variable_parameters()
|
||||||
|
|
||||||
|
async def set_variable_parameters(self, parameters):
|
||||||
|
return await super().set_variable_parameters(parameters)
|
||||||
@@ -148,6 +148,16 @@ class BaseWillingManager(ABC):
|
|||||||
async with self.lock:
|
async with self.lock:
|
||||||
self.chat_reply_willing[chat_id] = willing
|
self.chat_reply_willing[chat_id] = willing
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def get_variable_parameters(self) -> Dict[str, str]:
|
||||||
|
"""抽象方法:获取可变参数"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
@abstractmethod
|
||||||
|
async def set_variable_parameters(self, parameters: Dict[str, any]):
|
||||||
|
"""抽象方法:设置可变参数"""
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
def init_willing_manager() -> BaseWillingManager:
|
def init_willing_manager() -> BaseWillingManager:
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user