hdkiller / auto-gpt-systeminfo Goto Github PK
View Code? Open in Web Editor NEWA plugin for Auto-GPT which injects information about the operation system
License: MIT License
A plugin for Auto-GPT which injects information about the operation system
License: MIT License
As titled, when AutoGPT executes a command, such as "mkdir", it only returns STDOUT: b'' and STDERR: b''. How can I verify if the shell command was executed or not? I am using GPT-3.5 in continuous mode.
Sure, I can help you with this. The error "IndexError: tuple index out of range" is occurring because you are trying to access an index in the tuple win_ver that doesn't exist. The platform.win32_ver() function returns a tuple of strings, and the length of the tuple might be less than 5.
To fix this, you can check the length of the win_ver tuple before accessing its elements. Here's an updated version of the code block:
# Get Windows version (works on Windows only)
if platform.system() == "Windows":
win_ver = platform.win32_ver()
win_version = f"{win_ver[0]} {win_ver[1]}"
if len(win_ver) > 4:
win_version += f" {win_ver[4]}"
else:
win_version = None
This code will make sure that the tuple has at least 5 elements before trying to access the element at index 4. If the tuple has fewer elements, it will only include the first two elements in the win_version string.
running this: curl -o ./plugins/Auto-GPT-SystemInfo.zip https://github.com/hdkiller/Auto-GPT-SystemInfo/archive/refs/heads/master.zip breaks chatgpt, give message that this is not a true zip file. Then running after the install gives: File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/tom/Auto-GPT/autogpt/main.py", line 5, in
autogpt.cli.main()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/tom/Auto-GPT/autogpt/cli.py", line 96, in main
run_auto_gpt(
File "/Users/tom/Auto-GPT/autogpt/main.py", line 142, in run_auto_gpt
cfg.set_plugins(scan_plugins(cfg, cfg.debug_mode))
File "/Users/tom/Auto-GPT/autogpt/plugins.py", line 245, in scan_plugins
if moduleList := inspect_zip_for_modules(str(plugin), debug):
File "/Users/tom/Auto-GPT/autogpt/plugins.py", line 36, in inspect_zip_for_modules
with zipfile.ZipFile(zip_path, "r") as zfile:
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/zipfile.py", line 1269, in init
self._RealGetContents()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/zipfile.py", line 1336, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
I'm using the stable version of auto-gpt.
starting auto-gpt:
NEWS: From now on, we will be focusing on major improvements rather
NEWS: than bugfixes, as we feel stability has reached a reasonable level. Most remaining
NEWS: issues relate to limitations in prompt generation and the memory system, which will be
NEWS: the focus of our efforts for the next release.
NEWS:
NEWS:
Starting Telegram Listener...
WARNING: SystemInformationPlugin: EXECUTE_LOCAL_COMMANDS is false. System information will not be added to the context.
auto-gpt .env file looks like this:
################################################################################
################################################################################
EXECUTE_LOCAL_COMMANDS=true
I'm running auto-gpt inside docker on a windows 10 system.
@Brian-Webster @hdkiller Need a little help here:
[notice] To update, run: pip install --upgrade pip
Not loading plugin AutoGPTBaiduSearch. Key 'AutoGPTBaiduSearch' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTBaiduSearch) as the key.
Not loading plugin AutoGPTBingSearch. Key 'AutoGPTBingSearch' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTBingSearch) as the key.
Not loading plugin AutoGPTBluesky. Key 'AutoGPTBluesky' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTBluesky) as the key.
Not loading plugin AutoGPTEmailPlugin. Key 'AutoGPTEmailPlugin' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTEmailPlugin) as the key.
Not loading plugin PlannerPlugin. Key 'PlannerPlugin' was not found in plugins_config.yaml. Zipped plugins should use the class name (PlannerPlugin) as the key.
Not loading plugin AutoGPTRandomValues. Key 'AutoGPTRandomValues' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTRandomValues) as the key.
Not loading plugin AutoGPTSceneXPlugin. Key 'AutoGPTSceneXPlugin' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTSceneXPlugin) as the key.
Not loading plugin AutoGPTTelegram. Key 'AutoGPTTelegram' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTTelegram) as the key.
Not loading plugin AutoGPTTwitter. Key 'AutoGPTTwitter' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTTwitter) as the key.
Not loading plugin AutoGPTWikipediaSearch. Key 'AutoGPTWikipediaSearch' was not found in plugins_config.yaml. Zipped plugins should use the class name (AutoGPTWikipediaSearch) as the key.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/app/autogpt/main.py", line 5, in
autogpt.cli.main()
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1666, in invoke
rv = super().invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **kwargs)
File "/app/autogpt/cli.py", line 117, in main
run_auto_gpt(
File "/app/autogpt/main.py", line 131, in run_auto_gpt
config.plugins = scan_plugins(config, config.debug_mode)
File "/app/autogpt/plugins/init.py", line 283, in scan_plugins
loaded_plugins.append(a_module())
File "/usr/local/lib/python3.10/site-packages/abstract_singleton/init.py", line 14, in call
cls._instances[cls] = super().call(*args, **kwargs)
TypeError: Can't instantiate abstract class SystemInformationPlugin with abstract methods can_handle_report, can_handle_text_embedding, can_handle_user_input, handle_text_embedding, report, user_input
hi, any ideas why i'm being asked for a .env file? didn't see anything about it in the setup.
Traceback (most recent call last):
File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/home/atlas/autogpt/main.py", line 5, in
autogpt.cli.main()
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1635, in invoke
rv = super().invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/atlas/autogpt/cli.py", line 90, in main
run_auto_gpt(
File "/home/atlas/autogpt/main.py", line 118, in run_auto_gpt
cfg.set_plugins(scan_plugins(cfg, cfg.debug_mode))
File "/home/atlas/autogpt/plugins.py", line 223, in scan_plugins
zipped_module = zipped_package.load_module(str(module.parent))
File "", line 302, in load_module
File "plugins/Auto-GPT-SystemInfo.zip/Auto-GPT-SystemInfo-master/src/system_information_plugin/init.py", line 13, in
FileNotFoundError: [Errno 2] No such file or directory: '/home/atlas/.env'
Can you help me declare in the new structure?
plugin_a:
config:
api_key: my-api-key
enabled: false
plugin_b:
config: {}
enabled: true
Howdy, turns out you solved a problem that I just spent an hour fixing.
Just wanting to say, as I mentioned on the Auto-GPT project, I ended up using lsb_release -a (on Linux obviously) to provide surrounding context, and I use a "preparation" step before running shell commands, to get their version info via the equivalent of --version to get customized commands for the underlying environment.
The idea was prior to executing a shell command to check a local json file which serves as key/value storage, to look up the location(path)/version number of each command and use that info for future invocations.
So the basic idea [on *nix] was:
and store the corresponding data inside a JSON file for later use.
More specifically, I figured out that this contextual information is much more useful and effective if it is only conditionally added directly prior to running shell commands, as per: Significant-Gravitas/AutoGPT#2987 (comment)
Maybe some food for thought ...
Thanks & all the best
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.