File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
src/auto_gpt_plugin_template Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,30 @@ def handle_chat_completion(
244244 """
245245 pass
246246
247+ @abc .abstractmethod
248+ def can_handle_text_embedding (
249+ self , text : str
250+ ) -> bool :
251+ """This method is called to check that the plugin can
252+ handle the text_embedding method.
253+ Args:
254+ text (str): The text to be convert to embedding.
255+ Returns:
256+ bool: True if the plugin can handle the text_embedding method."""
257+ return False
258+
259+ @abc .abstractmethod
260+ def handle_text_embedding (
261+ self , text : str
262+ ) -> list :
263+ """This method is called when the chat completion is done.
264+ Args:
265+ text (str): The text to be convert to embedding.
266+ Returns:
267+ list: The text embedding.
268+ """
269+ pass
270+
247271 @abc .abstractmethod
248272 def can_handle_user_input (self , user_input : str ) -> bool :
249273 """This method is called to check that the plugin can
You can’t perform that action at this time.
0 commit comments