transitive-bullshit / bing-chat

Node.js client for Bing's new AI-powered search. It's like ChatGPT on steroids 🔥
MIT License
1.22k stars 128 forks source link

Please add support for commonjs #48

Open ShreshthTiwari opened 1 year ago

debotos commented 1 year ago

Yes, Please.

alokid commented 1 year ago

await import("bing-chat")

Zibri commented 5 months ago
import('bing-chat').then(_=>{

   BingChat=_.BingChat;
   async function main() {
       // Initialize the API with your valid cookie
       const api = new BingChat({ cookie: process.env.BING_COOKIE });

       // Send a message to Bing Chat
       const response = await api.sendMessage('Hello, how can I help?');
       console.log('Bing Chat response:', response.text);
   }

   main();

});