npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bardie-ts

v1.3.4

Published

A powerful AI package (built using typescript) for interacting with the Google Bard API, without needing to set your own cookie!

Downloads

103

Maintainers

zohebmalikzohebmalik

Keywords

AITPUGPTLLMBERTCUDABardAIaaSKerasOpenAIAI ArtNVIDIAPyTorchMistralAI NewsChatGPTEdge AIDatasetRoboticsTrainingCloud AIOntologyAI MusicInferenceAI GamingAI TrendsAI SafetyAI PolicyAI WritingRegressionPerplexityAI CoursesQuantum AIClusteringEmbeddingsBias in AITensorFlowIoT and AIAnnotationGoogle BardOverfittingSimulationsAI JournalsAI StartupsAI HardwareFine-tuningHuggingFaceAI ResearchData MiningPerplexityAISemantic WebScikit-learnEthics in AISegmentationUnderfittingAI WorkshopsAI EducationAI in RetailPerplexity AIMeta-learningDeep LearningAI InvestmentMultimodal AIAI ChallengesCrowdsourcingAI RegulationAI in FinanceSynthetic DataAI ConferencesFairness in AIExplainable AIAdversarial AISpeech-to-TextEdge ComputingText-to-SpeechClassificationLanguage ModelNeural NetworksAI AcceleratorsComputer VisionAI in EducationAI ApplicationsAI CompetitionsKnowledge GraphsAI in HealthcareMachine LearningObject DetectionCross-ValidationHuman-in-the-loopBlockchain and AISequence ModelingTransfer LearningAnomaly DetectionImage RecognitionFederated LearningTransformer ModelsSentiment AnalysisFacial RecognitionFeature ExtractionVirtual AssistantsQuestion AnsweringSpeech RecognitionAI in ManufacturingAttention MechanismAutonomous VehiclesRecommender SystemsFeature EngineeringSupervised LearningAI Ethics GuidelinesPredictive AnalyticsHyperparameter TuningUnsupervised LearningConversational AgentsReinforcement LearningDimensionality ReductionSemi-Supervised LearningNatural Language ProcessingNatural Language UnderstandingGenerative Adversarial Networks

Readme

BardieTS

BardieTS

Discord

📦 bardie-ts

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.

🔑 Key Features

  • 🤖 Answers question with AI assistance
  • 🖼️ Image recognition with descriptive responses
  • 💻 Simple to integrate into to any app
  • 🖋️ Broad compatibility to work with all major module types (CommonJS, ES6, UMD, AMD...)
  • 📄 Extremely well-documented codebase

📂 BardieTS Installation

You MUST have Node.js installed on your system for BardieTS to work.

npm, pnpm, OR yarn

npm -

npm i bardie-ts

pnpm -

pnpm add bardie-ts

yarn -

yarn add bardie-ts

💡 Examples Of Use

Asking A Simple Question

Typescript Usage -

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();

Javascript Usage -

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();

Response:

"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!"

Asking A Question With Image Input

Typescript Usage -

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();

Javascript Usage -

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();

Response:

"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!"

📝 Final Notes

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!)