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

ERR_REQUIRE_ESM #39

Open
chinazhaoht opened this issue Oct 12, 2023 · 1 comment
Open

ERR_REQUIRE_ESM #39

chinazhaoht opened this issue Oct 12, 2023 · 1 comment

Comments

@chinazhaoht
Copy link

project/node_modules/ts-node/dist/index.js:851
return old(m, filename);
^
Error [ERR_REQUIRE_ESM]: require() of ES Module

@yeasin6152
Copy link

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

let cookies = __Secure-1PSID=<YOUR_COOKIE>;
let bot = new Bard(cookies, {
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);

(Flow the step)

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