Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rizzlogy/bardie

A powerful library for interacting with the Google AI
https://github.com/rizzlogy/bardie

axios cli google-bard google-gemini-ai google-gemini-pro nodejs swaggerui

Last synced: 2 months ago
JSON representation

A powerful library for interacting with the Google AI

Awesome Lists containing this project

README

        

# Bardie



















# Bardie Installation

**📂 Normal Installation**

```bash
npm i bardie
```

#

**🔲 Installation For CLI**

```bash
npm i bardie -g
```

# Simple Examples

### **Example Question To Send Bard API Request**

#

```js
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:

```json
{
"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**

#

```js
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:

```json
{
"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](https://github.com/rizzlogy/bardie/issues/new)

#### ID
> Jika Ada Bug, Silahkan Buat [Issues](https://github.com/rizzlogy/bardie/issues/new)

#

**[Bardie](https://npmjs.com/bardie) also Supports Typescript & EsModule! 🥳**