Giter Club home page Giter Club logo

auto-gpt-systeminfo's People

Contributors

brian-webster avatar hdkiller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

auto-gpt-systeminfo's Issues

Return STDOUT: b'' STDERR: b'' value

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.

tuple index out of range after fresh install

Command line

image

Steps Taken

  • Pulled main branch of Auto GPT through this commit (midday Saturday 4/22/23)
  • Used the following command to download the system info plugin to the plugins folder: Invoke-WebRequest -Uri "https://github.com/hdkiller/Auto-GPT-SystemInfo/archive/refs/heads/master.zip" -OutFile "./plugins/Auto-GPT-SystemInfo.zip"
  • I did not unzip the file
  • I made 3 changes to the Auto GPT .env file:
  • EXECUTE_LOCAL_COMMANDS=True
  • RESTRICT_TO_WORKSPACE=True
  • ALLOWLISTED_PLUGINS=SystemInformationPlugin
  • I attempted to start an Auto GPT session. After taking my goals, but before asking for permission to proceed with the first action, Auto GPT crashed with the output shown in the screenshot above.

System Information

  • Windows 10
  • Python 3.10.5
  • AutoGPT - Master Branch, through this commit

Potentially helpful context from GPT 4:

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.

curl command with zip breaks autogpt

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

WARNING: SystemInformationPlugin: EXECUTE_LOCAL_COMMANDS is false. System information will not be added to the context.

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:
################################################################################

AUTO-GPT - GENERAL SETTINGS

################################################################################

EXECUTE_LOCAL_COMMANDS - Allow local command execution (Default: False)

RESTRICT_TO_WORKSPACE - Restrict file operations to workspace ./auto_gpt_workspace (Default: True)

EXECUTE_LOCAL_COMMANDS=true

RESTRICT_TO_WORKSPACE=True

I'm running auto-gpt inside docker on a windows 10 system.

TypeError: Can't instantiate abstract class

@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

asking for .env?

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'

lsb_release -a / --version info

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:

  • lsb_release -a (once during init)
  • cat /proc/cpuinfo (once during init)
  • cat /proc/meminfo (to show resource utilization at runtime)
  • which $TOOL (look up the path/location of the tool), store the unix time or md5hash of the tool, to update the JSON if needed
  • $TOOL --version (determine the installed version)

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.