recommended changes

This commit is contained in:
Siddhesh Agarwal
2024-10-31 20:40:21 +05:30
parent c4674fc98f
commit fd7289c8d3
-5
View File
@@ -29,27 +29,22 @@ class BasePlugin(SMBaseModel, ABC):
# Plugin metadata.
meta: Dict[str, Any] = {}
@abstractmethod
def initialize_hook(self, conversation: "Conversation") -> Any:
"""Initialize a hook for the plugin."""
raise NotImplementedError
@abstractmethod
def cleanup_hook(self, conversation: "Conversation") -> Any:
"""Cleanup a hook for the plugin."""
raise NotImplementedError
@abstractmethod
def add_message_hook(self, conversation: "Conversation", message: "Message") -> Any:
"""Add a message hook for the plugin."""
raise NotImplementedError
@abstractmethod
def pre_send_hook(self, conversation: "Conversation") -> Any:
"""Pre-send hook for the plugin."""
raise NotImplementedError
@abstractmethod
def post_send_hook(self, conversation: "Conversation", response: "Message") -> Any:
"""Post-send hook for the plugin."""
raise NotImplementedError