gravelBridge / AutoGPT-BingAI

An AutoGPT plugin to enable Bing AI in AutoGPT.
MIT License
174 stars 32 forks source link

Missing Requirements EdgeGPT #3

Open Losspost opened 1 year ago

Losspost commented 1 year ago

Hi,

It seems that the point of installing all requirements for the plugin is missing. I had to install EdgeGPT by adding it to the requirements.txt and build the docker again. I added the line for requirements.

Bing AI Plugin

The Bing AI Plugin enables Auto-GPT to use Bing AI to research information, ask questions, get advice, and more.

Screenshot 2023-05-01 at 7 49 55 AM

Key Features:

Getting Authentication (Required):

Installation

Follow these steps to configure the AutoGPT Bing AI Plugin:

1. Install requirements

Add EdgeGPT to the requirements.txt file inside the AutoGPT folder. If you use docker you have to build it again.

2. Clone this Repository

cd into a folder that you can find easily. For example: cd desktop. Then, paste this command: git clone https://github.com/gravelBridge/AutoGPTBingAI.git

3. Navigate to the folder

Navigate to the folder where you ran the cd command

4. Zip the BingAI folder

On MacOS, right click the BingAI folder and press Compress. On windows, right click the folder, and press Send to > Compressed (zipped).

5. Move the zip file

Move the new BingAI.zip file to the AutoGPT plugins directory, there should already be a file there titled __PUT_PLUGIN_ZIPS_HERE__.

6. Add BingAI configuration settings

Append the following configuration settings to the end of the .env file:

################################################################################
### BINGAI
################################################################################

BINGAI_COOKIES_PATH=./cookies.json
BINGAI_MODE=<your chosen mode>

For the BINGAI_MODE, use either precise, balanced, or creative.

AutoGPT Configuration

Set ALLOWLISTED_PLUGINS=BingAI,example-plugin1,example-plugin2,etc in your AutoGPT .env file.

7. Edit goals

When using Auto-GPT please set one of the goals to "Use ask_bing_genius whenever possible".

machadox commented 1 year ago

python3 -m pip install EdgeGPT --upgrade

W3Warp commented 1 year ago

That will not work, at least I did not for me. I got some version that don't even exist. This version however works like a charm pip install EdgeGPT==0.3.8

julien9679 commented 1 year ago

as of today I get this:

  File "plugins/AutoGPT-BingAI.zip/AutoGPT-BingAI-main/BingAI/__init__.py", line 58, in post_prompt
    from .bing_ai import(
  File "plugins/AutoGPT-BingAI.zip/AutoGPT-BingAI-main/BingAI/bing_ai.py", line 34, in <module>
    bot = Chatbot(cookie_path=cookie_path)
TypeError: Chatbot.__init__() got an unexpected keyword argument 'cookie_path'

which is the right version of EdgeGPT now? I am currently on 0.6.10 (I tried with 0.3.8 too, no luck either)

W3Warp commented 1 year ago

That will not work, at least I did not for me. I got some version that don't even exist. This version however works like a charm pip install EdgeGPT==0.3.8

  1. Make sure 0.3.8 is actually installed
  2. There might have been some bug fixes in the master branch (of Auto-GPT), I'm in the master branch and it works for me.
xiahan4956 commented 1 year ago

0.3.8 works. Thanks!

firelizard89 commented 1 year ago

I'm having this error. 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 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 "/app/autogpt/cli.py", line 96, in main run_auto_gpt( File "/app/autogpt/main.py", line 183, in run_auto_gpt system_prompt = ai_config.construct_full_prompt() File "/app/autogpt/config/ai_config.py", line 149, in construct_full_prompt prompt_generator = plugin.post_prompt(prompt_generator) File "plugins/AutoGPTBingAI.zip/AutoGPTBingAI/BingAI/init.py", line 58, in post_prompt from .bing_ai import( File "plugins/AutoGPTBingAI.zip/AutoGPTBingAI/BingAI/bing_ai.py", line 2, in from EdgeGPT import Chatbot, ConversationStyle ImportError: cannot import name 'Chatbot' from 'EdgeGPT' (/usr/local/lib/python3.10/site-packages/EdgeGPT/init.py)**

Not sure what I've done incorrectly here. Any suggestions?

mikdatdogru commented 1 year ago

@firelizard89 did you try this?

W3Warp commented 1 year ago

0.3.8 works. Thanks!

You're welcome! 😁

Teonanacatyl commented 1 year ago

make sure this is in requirements.txt and rebuild if in docker: EdgeGPT==0.3.8 if it's installed it doesn't matter - have to reference that exact version to get around the bug

Delyrium79 commented 1 year ago

Hi, I'm a complete newbie and I'm getting this:

Using Browser: chrome 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 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 "/app/autogpt/cli.py", line 96, in main run_auto_gpt( File "/app/autogpt/main.py", line 181, in run_auto_gpt system_prompt = ai_config.construct_full_prompt() File "/app/autogpt/config/ai_config.py", line 147, in construct_full_prompt prompt_generator = plugin.post_prompt(prompt_generator) File "plugins/AutoGPTBingAI.zip/AutoGPTBingAI/BingAI/init.py", line 58, in post_prompt from .bing_ai import( File "plugins/AutoGPTBingAI.zip/AutoGPTBingAI/BingAI/bing_ai.py", line 2, in from EdgeGPT import Chatbot, ConversationStyle ModuleNotFoundError: No module named 'EdgeGPT'