Bing Chat automated with Selenium Web Driver to exchange messages. Read the Docstring
in case you have an issue using it
- All the functions are
BingGPT4
class inside `helpers.py. - Use
chat
function to interact - app.py
is just a
streamlit` wrapper around it to show how it's working
-
Tested on
Ubuntu 20.04
. Needs to haveEdge
. You can usesudo apt install microsoft-edge-dev
,sudo apt install microsoft-edge-beta
orsudo apt install microsoft-edge-stable
based on your OS. Alternatively download it from here -
You need Edge Webdriver which can be downloaded directly from this link or via
wget https://msedgedriver.azureedge.net/114.0.1823.18/edgedriver_linux64.zip
. It is the file namededge
here but you need to download based on YOUR OS and Edge Version.
Warning Make sure that the path of
WebDriver
is CORRECTLY passed toBingGPT4
class as it is used to launch the driver
Note: I implemented almost everything except the response timing part. Right now you have to wait for a fixed time before the response is returned. If You wait too less, it'll give you half result or maybe
ElementNotFound
error and if you wait too long, it's a waste of time. So anyone having great knowledge of Selenium can implement a dynamic version by checking regurlarly and returning the response as soon as it finishes, please open a pull request.