How do I connect to BingAI with Replit?

I would like to use Replit’s Python to connect to BingAI and create a program to display the answers.
However, I’m looking for a method that doesn’t use BingAI’s API key or Open AI’s API key.
Can anyone please elaborate on this?
The programming flow assumes the following.

■ Contents of flow

Flow 1 :slight_smile:
User enters multiple company names at once

Flow 2 :slight_smile:
From the first item entered in batch to the last item entered one by one, enter it into the text input item to BingAI
As for the input form, the company name entered in flow 1 is entered in the text of the above example sentence, and the input is performed in the same sentence form as the example sentence.

Flow 3 :slight_smile:
Wait until the essential content from BingAI finishes for each input
In addition, the part to be extracted assumes the following from the CSS selector

cib-shared > div > div > div.ac-textBlock > ul > li:nth-child(1) > ul
cib-shared > div > div > div.ac-textBlock > ul > li:nth-child(2) > ul
cib-shared > div > div > div.ac-textBlock > ul > li:nth-child(3) > ul
cib-shared > div > div > div.ac-textBlock > ul > li:nth-child(4) > ul

4 flows :slight_smile:
When the answer comes, notify the user of the most content as follows for each case
Note that ① to ④ reflect the text written in the reply message

>>Response from BingAI
Entered company name (1) Company website URL (2) Business description (3) Address (4) Representative

Just so you know, Replit doesn’t own Python.


Anyway, you could try using selenium to open bing.com/chat, input your question, submit and wait for response and get the element text. People have done things like this with regular ChatGPT, so I think it should be attainable.

If you want to learn about selenium, you should chat with Bing itself about how to write a script for it

2 Likes

Also, please update the category of this post to say Code Help —> Python.