📂 Normal Installation
npm i bardie
🔲 Installation For CLI
npm i bardie -g
const { Bardie } = require("bardie");
const bard = new Bardie();
async function askQuestion() {
try {
let result = await bard.question({ ask: "Keep it simple... What is Google Bard?" });
console.log(result);
} catch (error) {
console.error("Error:", error.message);
}
};
askQuestion();
{
"content": "In a nutshell, I'm Google's AI helper you can chat with. I can answer your questions, generate creative text formats, and help you with various tasks in a simple and informative way. Think of me as a friendly AI companion ready to assist you anytime!",
"status": 200,
"creator": "RizzyFuzz"
}
const { Bardie } = require("bardie");
const bard = new Bardie();
async function askQuestionWithImage() {
try {
let result = await bard.question({
ask: "Keep it simple... What is this image?",
image: "https://i.imgur.com/OgoPlnf.png"
});
console.log(result);
} catch (error) {
console.error("Error:", error.message);
}
};
askQuestionWithImage();
{
"content": "The image you sent me is the logo of Bard, a large language model chatbot developed by Google AI. The logo consists of two colorful stars, one in red and orange and the other in blue and green, on a gray background. The stars are meant to represent creativity and knowledge, while the gray background represents the real world. I hope this helps!",
"status": 200,
"creator": "RizzyFuzz"
}
If there are bugs, please create Issues
Jika Ada Bug, Silahkan Buat Issues
Bardie also Supports Typescript & EsModule! 🥳