gravelbridge / autogpt-bingai Goto Github PK
View Code? Open in Web Editor NEWAn AutoGPT plugin to enable Bing AI in AutoGPT.
License: MIT License
An AutoGPT plugin to enable Bing AI in AutoGPT.
License: MIT License
I believe the BingGPT plugin is returning adaptiveCards to some search results, which this plugin cannot read. I don't know if it's possible for it to read them, but I think this is a change in what Bing is returning to some search results.
Hello, great project!
I'm sorry if this isn't considered an issue, but I don't see a Discussions section, so I thought I'd just post this here.
Unfortunately, I am not able to pay for API usage, so I was wondering if we could add this plugin to something like this project:
https://github.com/IntelligenzaArtificiale/Free-AUTO-GPT-with-NO-API ?
I wonder if it'd be possible to fully replace GPT with Bing instead of using Bing as a "helper", although I've heard Bing is much less willing to think with the user than GPT-3/4.
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
when I run the App .It shows : Command ask_genius_bing returned: Error: 'Agent' object has no attribute 'prompt'
Hi
Im using Autogpt .4.7, I had uissues but got it working using:
"python -m pip install EdgeGPT==0.4.1".
Now im receiving the next error:
File "C:\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "X:\AutoGPT-0.4.7\autogpt_main.py", line 5, in
autogpt.app.cli.main()
File "C:\Python\Python310\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Python\Python310\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Python\Python310\lib\site-packages\click\core.py", line 1666, in invoke
rv = super().invoke(ctx)
File "C:\Python\Python310\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Python\Python310\lib\site-packages\click\core.py", line 783, in invoke
return _callback(*args, **kwargs)
File "C:\Python\Python310\lib\site-packages\click\decorators.py", line 33, in new_func
return f(get_current_context(), *args, **kwargs)
File "X:\AutoGPT-0.4.7\autogpt\app\cli.py", line 121, in main
run_auto_gpt(
File "X:\AutoGPT-0.4.7\autogpt\app\main.py", line 166, in run_auto_gpt
agent = Agent(
File "X:\AutoGPT-0.4.7\autogpt\agents\agent.py", line 43, in init
super().init(
File "X:\AutoGPT-0.4.7\autogpt\agents\base.py", line 73, in init
self.system_prompt = ai_config.construct_full_prompt(config)
File "X:\AutoGPT-0.4.7\autogpt\config\ai_config.py", line 130, in construct_full_prompt
prompt_generator = plugin.post_prompt(prompt_generator)
File "X:\AutoGPT-0.4.7\plugins\BingAI_init.py", line 58, in post_prompt
from .bing_ai import(
File "X:\AutoGPT-0.4.7\plugins\BingAI\bing_ai.py", line 34, in
bot = Chatbot(cookie_path=cookie_path)
File "C:\Python\Python310\lib\site-packages\EdgeGPT.py", line 608, in init
self.chat_hub: _ChatHub = _ChatHub(
File "C:\Python\Python310\lib\site-packages\EdgeGPT.py", line 416, in init
conversation_signature=conversation.struct["conversationSignature"],
KeyError: 'conversationSignature'
TypeError: Chatbot.init() got an unexpected keyword argument 'cookie_path'
When I run AutoGPT, it asks me for the OpenAI key.
What is the purpose of this rebo? Considering that we have to pay for OpenAI, I thought we could use BingAI as a replacement for OpenAI's GPT.
It would be helpful to leave the Auto-GPT folder clean of unversionned artifacts.
Currently, I have to use a script to move cookie.json
out of my Auto-GPT folder so that I can pull and rebase.
keep getting hung up with event loop error
NEXT ACTION: COMMAND = ask_genius_bing ARGUMENTS = {'question': 'What is the current state of the market in the USA?'}
AUTHORISED COMMANDS LEFT: 3
SYSTEM: Command ask_genius_bing returned: Error: This event loop is already running
Using memory of type: LocalCache
Using Browser: chrome
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in run_code
File "C:\Users\SportsFan82\Desktop\AutoGPT Related\Auto-GPT-0.3.1\Auto-GPT-0.3.1\autogpt_main.py", line 5, in
autogpt.cli.main()
File "C:\Users\SportsFan82\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1130, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SportsFan82\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "C:\Users\SportsFan82\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1635, in invoke
rv = super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\SportsFan82\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SportsFan82\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\core.py", line 760, in invoke
return _callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SportsFan82\AppData\Local\Programs\Python\Python311\Lib\site-packages\click\decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SportsFan82\Desktop\AutoGPT Related\Auto-GPT-0.3.1\Auto-GPT-0.3.1\autogpt\cli.py", line 90, in main
run_auto_gpt(
File "C:\Users\SportsFan82\Desktop\AutoGPT Related\Auto-GPT-0.3.1\Auto-GPT-0.3.1\autogpt\main.py", line 171, in run_auto_gpt
system_prompt = ai_config.construct_full_prompt()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\SportsFan82\Desktop\AutoGPT Related\Auto-GPT-0.3.1\Auto-GPT-0.3.1\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
File "plugins\AutoGPTBingAI.zip\AutoGPTBingAI\BingAI\bing_ai.py", line 34, in
TypeError: Chatbot.init() got an unexpected keyword argument 'cookie_path'
Warning: Bing-Search-Plugin is not fully functional. Please set the SEARCH_ENGINE and BING_API_KEY environment variables.
Any ideas where to look now?
I have the bing cookies json in autogpt root and plugin directory - not sure where to put it.
I have the .env edited with correct info - I thought.... I have the api key defined.
################################################################################
### BINGAI
################################################################################
BINGAI_COOKIES_PATH=./cookies.json
BINGAI_MODE=precise
First of all thank you, for your work.
I pulled all the files and placed them in the right paths in my environment. Even installed EdgeGPT.
But when i run AutoGPT, after setting the goal including
"Use ask_bing_genius whenever possible"
i get this error: DOUBLE CHECK CONFIGURATION Please double check that you have setup a PAID OpenAI API Account. You can read more here: https://docs.agpt.co/setup/#getting-an-api-key
Is it not possible to test auto gpt without a paid API?
Thanks and cheers!
Problem:
The problem stemmed from a mismatch between the argument expected by the Chatbot
class constructor in the BingAI
Python module and the argument that was being passed to it. The error message pointed to this:
TypeError: Chatbot.__init__() got an unexpected keyword argument 'cookie_path'
This error indicates that the Chatbot
class's __init__
method was being called with an argument (cookie_path
) that it doesn't support.
Solution:
The solution was to change the Chatbot
class's constructor to accept the cookie_path
argument. Specifically, we added the following to the Chatbot
class's __init__
method:
def __init__(
self,
proxy: str | None = None,
cookies: list[dict] | None = None,
cookie_path: str | None = None
) -> None:
This allows the Chatbot
class to accept a cookie_path
argument when it's instantiated.
Also, we adjusted the rest of the class to handle the new cookie_path
argument appropriately. In this case, we didn't actually use cookie_path
within the class, but in a real-world application, you would want to ensure that any new arguments are used as intended within the class.
So, in summary, the error was caused by trying to pass an argument that wasn't accepted by the class constructor, and the solution was to modify the class constructor to accept and handle this argument.
Hi,
When I try to use plugin command 'ask_bing_genius' the following error occurs:
Error while getting response: CaptchaChallenge: User needs to solve CAPTCHA to continue.. If the error is in regards to invalid authorization, inform the user, and prompt them to check their BingAI cookies.json file.
SYSTEM: Command ask_genius_bing returned: CaptchaChallenge: User needs to solve CAPTCHA to continue.
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.
The Bing AI Plugin enables Auto-GPT to use Bing AI to research information, ask questions, get advice, and more.
bing.com
cookies.json
cookies.json
file into the Auto-GPT folder.Follow these steps to configure the AutoGPT Bing AI Plugin:
Add EdgeGPT to the requirements.txt file inside the AutoGPT folder. If you use docker you have to build it again.
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
Navigate to the folder where you ran the cd command
On MacOS, right click the BingAI folder and press Compress
. On windows, right click the folder, and press Send to > Compressed (zipped)
.
Move the new BingAI.zip file to the AutoGPT plugins directory, there should already be a file there titled __PUT_PLUGIN_ZIPS_HERE__
.
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.
Set ALLOWLISTED_PLUGINS=BingAI,example-plugin1,example-plugin2,etc
in your AutoGPT .env
file.
When using Auto-GPT please set one of the goals to "Use ask_bing_genius whenever possible".
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.