Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
A powerful AI package (built using typescript) for interacting with the Google Bard API, without needing to set your own cookie!
BardieTS is a multi-purpose AI package built with typescript that allows people to interact with the Google Bard API, without needing to set your own cookie! It provides simple, fast and powerful features for AI interactions, including the ability to answer questions intelligently and recognise image inputs.
You MUST have Node.js installed on your system for BardieTS to work.
npm i bardie-ts
pnpm add bardie-ts
yarn add bardie-ts
To use BardieTS in typescript, create a file named index.ts
in your project's root directory and make sure you have ts-node
(or equivalent) installed.
Once you have an index.ts
file with the contents below, execute ts-node index.ts
in your terminal.
import BardieTS from "bardie-ts";
const bard = new BardieTS();
const options = {
ask: "Keep it simple... What is Google Bard?"
};
async function askQuestion() {
try {
const result = await bard.question(options);
console.log(result.content);
} catch (error: any) {
console.error("Error:", error.message);
}
};
askQuestion();
To use BardieTS in javascript, create a file named index.js
in your project's root directory. You should already have node
installed.
Once you have an index.js
file with the contents below, execute node index.js
in your terminal.
const BardieTS = require("bardie-ts");
const bard = new BardieTS();
async function askQuestion() {
const result = await bard.question({
ask: "Keep it simple... What is Google Bard?"
});
console.log(result.content);
}
askQuestion();
"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!"
import BardieTS from "bardie-ts";
const bard = new BardieTS();
const options = {
ask: "Keep it simple... What is this image?",
image: "https://i.imgur.com/OgoPlnf.png"
};
async function askQuestionWithImage() {
try {
const result = await bard.question(options);
console.log(result.content);
} catch (error: any) {
console.error("Error:", error.message);
}
};
askQuestionWithImage();
const BardieTS = require("bardie-ts");
const bard = new BardieTS();
async function askQuestionWithImage() {
const result = await bard.question({
ask: "Keep it simple... What is this image?",
image: "https://i.imgur.com/OgoPlnf.png"
});
console.log(result.content);
}
askQuestionWithImage();
"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!"
If there are any bugs, please report them at issues for visibility.
Disclaimer: This package utilises a third-party API that interacts with Google's Bard API, without needing to set your own cookie token. The API works without needing to set your own cookie because the endpoint randomly uses pre-existing ones to send requests. Given the above, it is highly not recommended to send any personal information to the AI.
I have no affiliation with the creation of the endpoint (https://bard.rizzy.eu.org). It is important to note that the usage of this package should ideally not be intended for commercial purposes or the provision of services for profit. BardieTS should preferably be used along the lines of educational, research, or experimental purposes only.
Special Thanks: I would like to extend a special thanks to @rizzlogy for the original bardie package, which served as the inspiration for the development of this advanced TypeScript version. This version aims to be accessible to a wide range of developers, making it easier for them to integrate AI interactions into their projects.
I would also like to thank @underctrl-io for their tutorial on how to create and publish an npm package (the right way!)
FAQs
A powerful AI package (built using typescript) for interacting with the Google Bard API, without needing to set your own cookie!
We found that bardie-ts demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.