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 🙏

© 2026 – Pkg Stats / Ryan Hefner

free-chatbot

v1.0.2

Published

Free AI chatbots without API keys for web applications

Readme

free-chatbot

npm npm

Free AI chatbots without API keys for Node.js applications. Access multiple AI providers including Phind, DuckDuckGo, and Blackbox AI.

Installation

npm install free-chatbot

Basic Usage

import {
  createPhindChat,
  createDuckDuckGoChat,
  createBlackboxChat,
} from "free-chatbot";

// Initialize providers
const phind = createPhindChat();
const ddg = createDuckDuckGoChat();
const blackbox = createBlackboxChat();

// Basic Usage Example
async function basicExample() {
  try {
    // Using Phind
    const phindResponse = await phind.chat("What is JavaScript?");
    console.log("Phind response:", phindResponse);

    // Using DuckDuckGo
    const ddgResponse = await ddg.chat("What is Python?");
    console.log("DuckDuckGo response:", ddgResponse);

    // Using Blackbox
    const blackboxResponse = await blackbox.chat("Write a quicksort algorithm");
    console.log("Blackbox response:", blackboxResponse);
  } catch (error) {
    console.error("Error:", error);
  }
}

Providers and Their Features

1. Phind (Recommended for Programming)

const phind = createPhindChat();

// Supports context and model options
const response = await phind.chat("What is JavaScript?", {
  model: "Phind-70B",  // Optional, default is "Phind-70B"
  previousMessages: [   // Optional, for conversation context
    { role: "user", content: "Let's talk about programming" },
    { role: "assistant", content: "Sure! What would you like to know?" }
  ]
});

2. DuckDuckGo (Recommended for General Knowledge)

const ddg = createDuckDuckGoChat();

// Supports model selection but NOT context
const response = await ddg.chat("What is Python?", {
  model: "gpt-4o-mini"  // Optional, default is "gpt-4o-mini"
  // Note: DuckDuckGo doesn't support previousMessages
});

3. Blackbox (Recommended for Code Generation)

const blackbox = createBlackboxChat();

// Supports context and token limit
const response = await blackbox.chat("Write a function", {
  maxTokens: 1024,      // Optional, control response length
  previousMessages: [   // Optional, for conversation context
    { role: "user", content: "Let's write some code" },
    { role: "assistant", content: "Sure, what would you like to create?" }
  ]
});

Provider Capabilities

| Feature | Phind | DuckDuckGo | Blackbox | |---------|-------|------------|----------| | Context Support | ✅ | ❌ | ✅ | | Model Selection | ✅ | ✅ | ❌ | | Token Control | ❌ | ❌ | ✅ | | Code Generation | ✅ | ❌ | ✅ | | General Knowledge | ✅ | ✅ | ✅ |

Error Handling

try {
  const response = await phind.chat("Hello");
  console.log(response);
} catch (error) {
  console.error("Error:", error);
}

Best Practices

  1. Phind

    • Best for programming questions
    • Good with technical context
    • Supports conversation history
  2. DuckDuckGo

    • Use for single, standalone questions
    • Good for general knowledge
    • Don't use previousMessages with this provider
  3. Blackbox

    • Excellent for code generation
    • Good with context
    • Use maxTokens to control response length

Limitations

  • DuckDuckGo doesn't support conversation context
  • Response times may vary between providers
  • Rate limiting may apply
  • Internet connection required
  • Services may occasionally be unavailable

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.