gravelBridge / AutoGPT-BingAI

An AutoGPT plugin to enable Bing AI in AutoGPT.
MIT License
172 stars 33 forks source link

In Auto_gpt 0.4.0,the plugin dose not work. #14

Open xiahan4956 opened 1 year ago

xiahan4956 commented 1 year ago

In Auto_GPT 0.4.0

I have install edgegpt == 0.3.8

but SYSTEM return : SYSTEM: Command ask_genius_bing returned: Error: 'Agent' object has no attribute 'prompt'

if I pip install EdgeGPT --upgrade. The programe will raise other error.

Exception has occurred: ImportError
cannot import name 'Chatbot' from 'EdgeGPT' (c:\Users\xiahan\Documents\BaiduSyncdisk\code\Auto-GPT\venv\lib\site-packages\EdgeGPT\__init__.py)
  File "C:\Users\xiahan\Documents\BaiduSyncdisk\code\Auto-GPT\autogpt\config\ai_config.py", line 149, in construct_full_prompt
    prompt_generator = plugin.post_prompt(prompt_generator)
  File "C:\Users\xiahan\Documents\BaiduSyncdisk\code\Auto-GPT\autogpt\main.py", line 183, in run_auto_gpt
    system_prompt = ai_config.construct_full_prompt()
  File "C:\Users\xiahan\Documents\BaiduSyncdisk\code\Auto-GPT\autogpt\cli.py", line 96, in main
    run_auto_gpt(
  File "C:\Users\xiahan\Documents\BaiduSyncdisk\code\Auto-GPT\autogpt\__main__.py", line 5, in <module>
    autogpt.cli.main()
ImportError: cannot import name 'Chatbot' from 'EdgeGPT' (c:\Users\xiahan\Documents\BaiduSyncdisk\code\Auto-GPT\venv\lib\site-packages\EdgeGPT\__init__.py)

But in AUTO_GPT 0.3.1 I use pip install EdgeGPT --upgrade. It also throw cannot import name 'Chatbot' from 'EdgeGPT' (c:\Users\xiahan\Documents\BaiduSyncdisk\code\Auto-GPT\venv\lib\site-packages\EdgeGPT\__init__.py)

When I use edgegpt==0.3.8 ,it works

5632515 commented 1 year ago

try to add from .EdgeGPT import * into init.py in ..../site-packages/EdgeGPT/

IlBoni commented 1 year ago

HI,

I have the exact same problem but also from before AutoGPT version 0.4. I'm using EdgeGPT-0.10.16, I've tried to suggestion above but nothing changed. If it helps, I copy the last output:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\User\AutoGPT\Auto-GPT\autogpt\__main__.py", line 5, in <module>
    autogpt.cli.main()
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1635, in invoke
    rv = super().invoke(ctx)
         ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AppData\Roaming\Python\Python311\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AutoGPT\Auto-GPT\autogpt\cli.py", line 96, in main
    run_auto_gpt(
  File "C:\Users\User\AutoGPT\Auto-GPT\autogpt\main.py", line 183, in run_auto_gpt
    system_prompt = ai_config.construct_full_prompt()
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\User\AutoGPT\Auto-GPT\autogpt\config\ai_config.py", line 149, in construct_full_prompt
    prompt_generator = plugin.post_prompt(prompt_generator)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "plugins\BingAI.zip\BingAI\__init__.py", line 58, in post_prompt
  File "plugins\BingAI.zip\BingAI\bing_ai.py", line 2, in <module>
ImportError: cannot import name 'Chatbot' from 'EdgeGPT' (C:\Program Files\Python311\Lib\site-packages\EdgeGPT\__init__.py)

Tank you!