PawanOsman / GoogleBard

GoogleBard - A reverse engineered API for Google Bard chatbot for NodeJS
https://bard.google.com
MIT License
415 stars 58 forks source link

how to use in commonJS #35

Open bapine opened 1 year ago

yeasin6152 commented 8 months ago

const bardModule = await import('googlebard'); const Bard = bardModule.Bard;

And other code add

let cookies = __Secure-1PSID=<YOUR_COOKIE>; let bot = new Bard(cookies, {0 inMemory: false, savePath: "./conversations.json", // this is being done to save crucial information about the conversation so the bot remembers it }); let conversationId = "test_id"; let response = await bot.ask("My name is Mehul", conversationId); console.log(response);