Introducing bard-ai
v2
With a completely reworked API that has been designed from the ground up for efficiency and simplicity, bard-ai
v2 brings a load of new features and improvements.
✨ New Features
- 🖼️ Ability to parse images with Google Lens
- 🧩 More simplistic and powerful API
- 🍪 Multi-Cookie Use
And many more under-the-hood changes!
📝 New Documentation
We now have a documentation website at bard.js.org!
It's all updated for V2 and has great examples, FAQs, and more.
🧩 API Changes
Now, instead of a global Bard object that only supports 1 cookie, you can create multiple instances of Bard
, with different cookies. This helps prevent rate-limiting, and more. Here's a taste of the new API:
import Bard from "bard-ai"
let bot = new Bard(COOKIE)
bot.ask("Hello world!")
🔐 Authentication Fixes
Now, bard-ai
V2 supports additional cookies for easier authentication... actually, it supports as many cookies as you want!
For example, providing an additional __Secure-#PSIDTS
cookie is as simple as this.
import Bard from "bard-ai"
let bot = new Bard({
"__Secure-1PSID": PSID,
"__Secure-1PSIDTS": PSIDTS
})
And pop any more cookies you want there, just by adding a new key/value pair to the dictionary.
🌟 And there's so much more! Check out the docs for more information.