Open nalbion opened 1 year ago
I was unaware you needed to extend from AutoGPTPluginTemplate, that would make sense to why when I was trying to get a simple plugin to work (using the AutoGPTPluginTemplate from the .zip) I was coming up with errors.
Though I do suspect that it's my lack of knowledge towards the python language that holds me at a disadvantage a little too.
I'll keep playing around with it :-)
Could somebody please improve the documentation?
From what I can gather, a plugin must extend
AutoGPTPluginTemplate
and set:It should also implement
can_handle_xxxx
methods, returning True only if they do something other thanpass
inxxxx
, the options of which are:post_prompt
...why?
This seems to be the only method that any of the existing plugins currently implement.
I can see that they register commands that they can support, presumably this is only called once. I'm not sure how the class registers it self though.
I can see that they define the args that are provided to the function being registered.
"imap_search_command": "<imap_search_criteria_command>",
seems to break a convention - any reason, or is the string content just arbitrary?Parameters:
on_response
Parameters:
{"arg name": "value"}
?Return
A string - but what should it look like? Who/what reads it and when/why? ...Is this just a string, as you'd see in a response from ChatGPT?
response
formaton_planning
...Who is involved in this "planning chat"? ...What are the messages? Are they just
{role: "", content: ""}
? Can somebody please provide a realistic example?Parameters
Returns
Optional string - what/why?
post_planning
Parameters:
Returns
pre_instruction
Parameters
...can we get have an example?
Returns
the same messages?
on_instruction
Parameters
...what do the context messages look like? Are they for humans or the system?
post_instruction
Args: response (str): The response.
pre_command
...some example use cases for some of these would be useful
Args: command_name (str): The command name. arguments (Dict[str, Any]): The arguments.
post_command
handle_chat_completion
...the whole session or one turn?
user_input
returns the user input as a string
report