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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dissu-talks

v0.1.6

Published

A customizable React chatbot component that can be easily integrated into any web application. Supports multiple LLM providers, custom styling, file uploads, feedback collection, and more.

Readme

Dissu Talks - React Chatbot Component

A customizable React chatbot component that can be easily integrated into any web application.
Supports multiple LLM providers, custom styling, file uploads, feedback collection, and more.

✨ Features

  • Multiple Integration Options:
    • Backend API integration
    • Direct LLM API integration (OpenAI, Google Gemini, Anthropic Claude)
    • Simple LLM selection with provider and API key
    • Custom API request/response formatting
  • Customization:
    • Positioning: bottom-right, bottom-left, top-right, top-left
    • Styling: colors, themes, fonts
    • Light / Dark / System theme support
    • Custom welcome message and input placeholder
  • Interactive Features:
    • File uploads
    • Feedback collection
    • Suggested questions
    • Chat history persistence
    • Timestamps
  • Responsive Design:
    • Mobile-friendly
    • Adjustable chat window size

🚀 Installation

npm install dissu-talks

🛠️ Usage

Basic Setup with Backend API

import { ChatBot } from 'dissu-talks';

function App() {
  return (
    <div>
      <ChatBot
        backendUrl="https://api.example.com/chat"
        context="This is a chatbot for a finance SaaS tool."
        responseType="formal"
        position="bottom-right"
        welcomeMessage="Welcome! Ask me anything."
        styling={{ widgetColor: "#4f46e5", textColor: "#ffffff" }}
        theme="light"
        placeholderText="Ask your question..."
      />
    </div>
  );
}

⚡ Easiest LLM Integration (Recommended)

Just pass llmProvider and apiKey props. No need to construct a config object!

1. OpenAI (ChatGPT)

<ChatBot
  llmProvider="openai"
  apiKey="YOUR_OPENAI_API_KEY"
  context="This is a chatbot for a finance SaaS tool."
  responseType="formal"
  position="bottom-left"
  welcomeMessage="Welcome! Ask me anything."
  styling={{ widgetColor: "#10b981", textColor: "#ffffff" }}
  theme="light"
  placeholderText="Ask your question..."
/>

2. Google Gemini

<ChatBot
  llmProvider="gemini"
  apiKey="YOUR_GEMINI_API_KEY"
  context="This is a chatbot for a finance SaaS tool."
  responseType="formal"
  position="bottom-left"
  welcomeMessage="Welcome! Ask me anything."
  styling={{ widgetColor: "#8e24aa", textColor: "#ffffff" }}
  theme="light"
  placeholderText="Ask your question..."
/>

3. Anthropic Claude

<ChatBot
  llmProvider="claude"
  apiKey="YOUR_CLAUDE_API_KEY"
  context="You are a helpful assistant for a finance SaaS tool."
  position="top-right"
  welcomeMessage="Hello! I'm Claude. How can I assist you today?"
  styling={{ widgetColor: "#7c3aed", textColor: "#ffffff" }}
  theme="dark"
/>

🛠️ Advanced: Custom LLM Config (Optional)

You can still use the advanced directLlmConfig prop for full control (custom endpoints, models, headers, etc):

<ChatBot
  directLlmConfig={{
    apiEndpoint: "https://api.openai.com/v1/chat/completions",
    apiKey: "YOUR_API_KEY",
    model: "gpt-3.5-turbo"
  }}
  context="This is a chatbot for a finance SaaS tool."
  responseType="formal"
  position="bottom-left"
  welcomeMessage="Welcome! Ask me anything."
  styling={{ widgetColor: "#10b981", textColor: "#ffffff" }}
  theme="light"
  placeholderText="Ask your question..."
/>

Additional Features

📂 Enable File Upload

<ChatBot
  enableFileUpload={true}
  onFileUpload={async (file) => {
    const formData = new FormData();
    formData.append('file', file);
    await fetch('https://api.example.com/upload', {
      method: 'POST',
      body: formData
    });
  }}
  allowedFileTypes={['.pdf', '.doc', '.docx', '.txt']}
  maxFileSizeMB={5}
/>

📝 Enable Feedback Collection

<ChatBot
  enableFeedback={true}
  onFeedbackSubmit={(messageId, rating, comment) => {
    console.log(`Feedback for message ${messageId}: ${rating} ${comment || ''}`);
  }}
/>

💬 Suggested Questions

<ChatBot
  suggestedQuestions={[
    "What are the key features?",
    "How do I get started?",
    "What's the pricing model?"
  ]}
/>

💾 Persist Chat History

<ChatBot persistChat={true} />

📋 Props Reference

| Prop | Type | Default | Description | |:-----|:-----|:--------|:------------| | backendUrl | string | - | API endpoint URL for backend | | llmProvider | 'openai' \| 'gemini' \| 'claude' | - | LLM provider (recommended, use with apiKey) | | apiKey | string | - | API key for the LLM provider (recommended) | | directLlmConfig | object | - | Advanced: Direct LLM API config (overrides llmProvider/apiKey) | | context | string | - | Context to guide AI responses | | responseType | string | 'formal' | Tone of the AI ('casual', 'formal', 'technical') | | position | string | 'bottom-right' | Widget position | | welcomeMessage | string | 'Hello! How can I help you today?' | Initial welcome text | | styling | object | {} | Widget color, text color, etc. | | theme | string | 'light' | Theme type ('light', 'dark', 'system') | | placeholderText | string | 'Type your message...' | Input placeholder | | headerTitle | string | 'Chat Assistant' | Header text | | showTimestamps | boolean | false | Show timestamps for each message | | botAvatarUrl | string | - | Custom bot avatar | | maxHeight | string | '500px' | Max chat window height | | persistChat | boolean | false | Save conversation history locally | | enableFileUpload | boolean | false | Enable file upload feature | | enableFeedback | boolean | false | Collect feedback after messages | | suggestedQuestions | string[] | [] | Pre-suggested questions |

🤝 Contributing

Contributions, issues, and feature requests are welcome!
Feel free to submit a Pull Request