diff --git a/src/auto_gpt_plugin_template/__init__.py b/src/auto_gpt_plugin_template/__init__.py index 689a403..514955f 100644 --- a/src/auto_gpt_plugin_template/__init__.py +++ b/src/auto_gpt_plugin_template/__init__.py @@ -244,6 +244,30 @@ def handle_chat_completion( """ pass + @abc.abstractmethod + def can_handle_text_embedding( + self, text: str + ) -> bool: + """This method is called to check that the plugin can + handle the text_embedding method. + Args: + text (str): The text to be convert to embedding. + Returns: + bool: True if the plugin can handle the text_embedding method.""" + return False + + @abc.abstractmethod + def handle_text_embedding( + self, text: str + ) -> list: + """This method is called when the chat completion is done. + Args: + text (str): The text to be convert to embedding. + Returns: + list: The text embedding. + """ + pass + @abc.abstractmethod def can_handle_user_input(self, user_input: str) -> bool: """This method is called to check that the plugin can