Skip to content

Latest commit

 

History

History
116 lines (87 loc) · 2.9 KB

README.md

File metadata and controls

116 lines (87 loc) · 2.9 KB

Bardie



Bardie Installation

📂 Normal Installation

npm i bardie

🔲 Installation For CLI

npm i bardie -g

Simple Examples

Example Question To Send Bard API Request

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();
Response:
{
  "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"
}

Example Question With Image To Send Bard API Request

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();
Response:
{
  "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"
}

Note

EN

If there are bugs, please create Issues

ID

Jika Ada Bug, Silahkan Buat Issues

Bardie also Supports Typescript & EsModule! 🥳