🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

litechatbot

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

litechatbot

Drop-in chatbot SDK + React widget. Multi-LLM with fallback, business config, anti-hallucination guards. One import, one config — your site has a chatbot.

latest
Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
20
150%
Maintainers
1
Weekly downloads
 
Created
Source

litechatbot ⚡

Drop-in AI chatbot SDK for any website. LiteLLM-style multi-provider with fallback + React widget + anti-hallucination guards.

npm install litechatbot

One-line widget

import { ChatWidget } from 'litechatbot/react';

<ChatWidget
  business={{
    name: 'Acme Plumbing',
    services: [
      { name: 'Sink leak inspection', price: '$95' },
      { name: 'Toilet unclogging', price: '$85-150' }
    ],
    hours: 'Mon-Sat 8am-6pm',
    serviceArea: ['Vancouver', 'Burnaby']
  }}
  providers={{
    primary: 'deepseek',
    fallbacks: ['groq', 'openai'],
    keys: {
      deepseek: process.env.DEEPSEEK_KEY,
      groq: process.env.GROQ_KEY,
      openai: process.env.OPENAI_KEY
    }
  }}
/>

That's it. You now have a floating chat bubble in the corner of your site.

Headless API

If you want to wire the bot into your own UI:

import { ChatBot } from 'litechatbot';

const bot = new ChatBot({
  business: { name: 'Acme', services: [{ name: 'Tutoring', price: '$50/hr' }] },
  providers: { primary: 'deepseek', keys: { deepseek: 'sk-...' } }
});

const { reply, usedProvider, guardWarnings } = await bot.reply('How much?');

Supported providers

Any OpenAI-compatible endpoint works. Built-in: openai, deepseek, groq, gemini, anthropic, cerebras, sambanova, fireworks, mistral, openrouter, moonshot.

Fallback chain auto-retries on 429 / rate-limit / 5xx / timeout.

Anti-hallucination guards

Built-in checks strip dangerous phrases like:

  • "I've booked you in"
  • "Someone is on the way"
  • "Your appointment is confirmed"
  • "I guarantee delivery at X"

Replies that try to invent dispatch, confirmation, or guarantees get sanitized before reaching the user.

Why not Vercel AI SDK / LangChain / ChatBotKit?

litechatbotVercel AI SDKLangChainChatBotKit
Drop-in widget❌ primitives✅ (cloud-locked)
Multi-provider fallbackwire it yourselfcloud
Business config schema
Anti-hallucination guardsseparate libs
Open sourceApache 2.0Apache 2.0MITproprietary
Self-host

Status

🚧 v0.1.0 — MVP. API may change.

License

Apache-2.0. Free for commercial use.

  • GitHub
  • Issues

Keywords

chatbot

FAQs

Package last updated on 25 May 2026

Did you know?

Socket

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.

Install

Related posts