You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I can gather, a plugin must extend AutoGPTPluginTemplate and set:
self._name
self._version
self._description
It should also implement can_handle_xxxx methods, returning True only if they do something other than pass in xxxx, the options of which are:
post_prompt
This method is called just after the generate_prompt is called, but actually before the prompt is generated.
...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:
prompt: PromptGenerator - okay, this is actually fairly well documented. The prompt is sent to the LLM
on_response
Parameters:
response - I guess we're expecting it's as per below?
*args - is this {"arg name": "value"} ?
*kwargs ...I've got no idea
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?
This method is called when a response is received from the model
response format
{
"thoughts": {
"text": "thought",
"reasoning": "reasoning",
"plan": "- short bulleted\n- list that conveys\n- long-term plan",
"criticism": "constructive self-criticism",
"speak": "thoughts summary to say to user",
},
"command": {"name": "command name", "args": {"arg name": "value"}},
}
on_planning
This method is called before the planning chat completion is done
...Who is involved in this "planning chat"?
...What are the messages? Are they just {role: "", content: ""}? Can somebody please provide a realistic example?
Parameters
prompt: PromptGenerator
messages: List[Message]
Returns
Optional string - what/why?
post_planning
This method is called after the planning chat completion is done.
Parameters:
response: str
Returns
str - what should this be?
pre_instruction
This method is called before the instruction chat is done
Parameters
messages (List[Message]): The list of context messages.
...can we get have an example?
Returns
the same messages?
on_instruction
This method is called when the instruction chat is done.
Parameters
messages (List[Message]): The list of context messages.
...what do the context messages look like? Are they for humans or the system?
post_instruction
This method is called after the instruction chat is done
Args:
response (str): The response.
Returns:
str: The resulting response.
pre_command
This method is called before the command is executed
...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
This method is called after the command is executed.
Args:
command_name (str): The command name.
response (str): The response.
Returns:
str: The resulting response.
handle_chat_completion
This method is called when the chat completion is done.
...the whole session or one turn?
Args:
messages (List[Message]): The messages.
model (str): The model name.
temperature (float): The temperature.
max_tokens (int): The max tokens.
user_input
This method is called to request user input to the user
user_input (str): The question or prompt to ask the user.
returns the user input as a string
report
Generates a report to the user
...what's in the message?
mesage: str
The text was updated successfully, but these errors were encountered:
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.
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
The text was updated successfully, but these errors were encountered: