significant-gravitas / auto-gpt-plugin-template Goto Github PK
View Code? Open in Web Editor NEWA starting point for developing your own plug-in for Auto-GPT
License: MIT License
A starting point for developing your own plug-in for Auto-GPT
License: MIT License
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 than pass
in xxxx
, the options of which are:
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:
{"arg name": "value"}
?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"}},
}
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?
Optional string - what/why?
This method is called after the planning chat completion is done.
This method is called before the instruction chat is done
...can we get have an example?
the same messages?
This method is called when the instruction chat is done.
...what do the context messages look like? Are they for humans or the system?
This method is called after the instruction chat is done
Args:
response (str): The response.
Returns:
str: The resulting response.
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.
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.
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.
This method is called to request user input to the user
returns the user input as a string
Generates a report to the user
...what's in the message?
While running docker compose run --rm auto-gpt --install-plugin-deps
, the following error appears:
Plugin config is invalid, continuing without plugins. Error: Invalid plugin config data type: <class 'list'>
My plugins_config.yaml
file content is:
commercetools:
- config: {} # Configs from the plugin README and installation instructions.
- enabled: true
When i remove the hyphen from the plugins_config.yaml
file, the error does not appear anymore but the plugin is not loaded
The auto-gpt-plugin-template
package on pypi is out of date, and seems out of sync with this repo:
List[Message]
in the repo vs List[str]
in the packageThis causes type errors in the Auto-GPT codebase, because it imports the pypi package rather than the repo:
Hi my name is Kepar,
recently i found a chatgpt clone (3.5 turbo) model for free
i leave the code here, tell me if something happens with this, hope i helped the world
import json
import requests
safeInput = input('Request: ')
# Prepare the data payload
data = {
"prompt": safeInput
}
payload = json.dumps(data)
# Set the headers
headers = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0",
"Accept": "application/json, text/plain, */*",
"Accept-Language": "en-US,en;q=0.5",
"Content-Type": "application/json",
"Origin": "https://chatbot.theb.ai",
"Referer": "https://chatbot.theb.ai/"
}
# Send the POST request
url = "https://chatbot.theb.ai/api/chat-process"
response = requests.post(url, data=payload, headers=headers)
# Process the response
if response.status_code == 200:
response_text = response.text
# Find the last JSON string in the response text
json_strings = response_text.strip().split('\n')
last_json_string = json_strings[-1]
response_json = json.loads(last_json_string)
print(response_json['text'])
else:
print("Error:", response.status_code)
```
IF SOMEONE CAN MAKE A PLUGIN FOR THIS API, IT COULD BE REALLY APPRECIATED
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.