Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use in commonJS #35

Open
bapine opened this issue Sep 1, 2023 · 1 comment
Open

how to use in commonJS #35

bapine opened this issue Sep 1, 2023 · 1 comment

Comments

@bapine
Copy link

bapine commented Sep 1, 2023

No description provided.

@yeasin6152
Copy link

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants