Convert Figma logo to code with AI

Bin-Huang logochatbox

User-friendly Desktop Client App for AI Models/LLMs (GPT, Claude, Gemini, Ollama...)

20,644
2,088
20,644
358

Top Related Projects

52,188

🔮 ChatGPT Desktop Application (Mac, Windows and Linux)

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。

Minimal web UI for ChatGPT.

AI chat for every model.

An amazing UI for OpenAI's ChatGPT (Website + Windows + MacOS + Linux)

10,683

A self-hosted, offline, ChatGPT-like chatbot. Powered by Llama 2. 100% private, with no data leaving your device. New: Code Llama support!

Quick Overview

The Bin-Huang/chatbox repository is a web-based chat application built using React, Socket.IO, and Node.js. It allows users to create and join chat rooms, send messages, and receive real-time updates from other users in the same room.

Pros

  • Real-time Communication: The application uses Socket.IO to enable real-time communication between clients, providing a seamless and responsive chat experience.
  • Scalable Architecture: The use of Node.js and Socket.IO allows the application to handle a large number of concurrent users and messages efficiently.
  • Modern UI: The application is built with React, providing a modern and responsive user interface that is easy to use and visually appealing.
  • Open-Source: The project is open-source, allowing developers to contribute, customize, and extend the functionality as needed.

Cons

  • Limited Features: The current version of the application provides basic chat functionality, but may lack more advanced features like file sharing, user profiles, or group chat.
  • Dependency on External Libraries: The project relies on several external libraries (React, Socket.IO, Node.js), which may introduce potential compatibility issues or security vulnerabilities if not properly maintained.
  • Lack of Documentation: The project's documentation is limited, which may make it challenging for new developers to understand the codebase and contribute effectively.
  • Potential Scalability Concerns: While the use of Node.js and Socket.IO provides a scalable architecture, the project may face scalability challenges as the number of users and messages increases, especially without proper load balancing and server management.

Code Examples

Here are a few code examples from the Bin-Huang/chatbox repository:

  1. Establishing a Socket.IO Connection:
import io from 'socket.io-client';

const socket = io('http://localhost:3000');

socket.on('connect', () => {
  console.log('Connected to server');
});

socket.on('message', (data) => {
  console.log('Received message:', data);
});

socket.emit('message', 'Hello, server!');

This code demonstrates how the client-side application establishes a connection with the server using Socket.IO and listens for incoming messages.

  1. Handling Chat Room Creation:
import { useState } from 'react';
import io from 'socket.io-client';

const ChatRoomCreator = () => {
  const [roomName, setRoomName] = useState('');
  const socket = io('http://localhost:3000');

  const createRoom = () => {
    socket.emit('create_room', roomName);
    // Redirect user to the newly created room
  };

  return (
    <div>
      <input
        type="text"
        value={roomName}
        onChange={(e) => setRoomName(e.target.value)}
        placeholder="Enter room name"
      />
      <button onClick={createRoom}>Create Room</button>
    </div>
  );
};

This code snippet shows how the client-side application handles the creation of a new chat room, including the user input for the room name and the emission of a create_room event to the server.

  1. Sending and Receiving Messages:
import { useState, useEffect } from 'react';
import io from 'socket.io-client';

const ChatRoom = () => {
  const [messages, setMessages] = useState([]);
  const [newMessage, setNewMessage] = useState('');
  const socket = io('http://localhost:3000');

  useEffect(() => {
    socket.on('message', (data) => {
      setMessages((prevMessages) => [...prevMessages, data]);
    });

    return () => {
      socket.disconnect();
    };
  }, [socket]);

  const sendMessage = () => {
    socket.emit('message', newMessage);
    setNewMessage('');
  };

  return (
    <div>
      <div>
        {messages.map((message, index) => (
          <div key={index}>{message}</div>
        ))}
      </div>
      <input
        type="text"
        value={newMessage}
        onChange={(e

Competitor Comparisons

52,188

🔮 ChatGPT Desktop Application (Mac, Windows and Linux)

Pros of ChatGPT

  • More comprehensive feature set, including voice input and custom API endpoints
  • Cross-platform support (Windows, macOS, Linux)
  • Active development with frequent updates and bug fixes

Cons of ChatGPT

  • Larger codebase and potentially more complex to contribute to
  • Heavier resource usage due to additional features

Code Comparison

ChatGPT:

export function i18n(
  name: string,
  params?: Record<string, string | number>,
): string {
  const val = t(name, params);
  return val !== name ? val : name;
}

Chatbox:

export function i18n(key: string): string {
  return i18next.t(key);
}

ChatGPT uses a more flexible approach, allowing for parameter passing and fallback to the original key, while Chatbox offers a simpler implementation.

Both projects are Electron-based ChatGPT clients, but ChatGPT offers a more feature-rich experience at the cost of increased complexity. Chatbox focuses on simplicity and ease of use, making it potentially more accessible for beginners or those seeking a lightweight solution.

A cross-platform ChatGPT/Gemini UI (Web / PWA / Linux / Win / MacOS). 一键拥有你自己的跨平台 ChatGPT/Gemini 应用。

Pros of ChatGPT-Next-Web

  • More feature-rich with advanced functionalities like conversation management and custom prompts
  • Supports multiple languages and offers a more polished user interface
  • Actively maintained with frequent updates and a larger community

Cons of ChatGPT-Next-Web

  • More complex setup process, potentially requiring more technical knowledge
  • Heavier resource usage due to additional features and dependencies

Code Comparison

ChatGPT-Next-Web:

export async function requestChatStream(options: ChatRequest) {
  const controller = new AbortController();
  try {
    const chatPayload = {
      messages: options.messages.map((v) => ({
        role: v.role,
        content: v.content,
      })),
      // ... more configuration options
    };
    // ... API call and response handling
  } catch (e) {
    console.error("[Request] failed to make a chat request", e);
    return null;
  }
}

Chatbox:

async function* streamCompletion(messages: ChatMessage[], options: StreamOptions = {}) {
  const response = await fetch(API_URL, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      Authorization: `Bearer ${API_KEY}`,
    },
    body: JSON.stringify({
      model: 'gpt-3.5-turbo',
      messages,
      stream: true,
    }),
  });
  // ... stream handling
}

Both projects implement chat streaming, but ChatGPT-Next-Web offers more configuration options and error handling, while Chatbox provides a simpler implementation focused on core functionality.

Minimal web UI for ChatGPT.

Pros of chatgpt-demo

  • Simpler setup and deployment process
  • More lightweight and focused on core ChatGPT functionality
  • Better documentation for quick start and configuration

Cons of chatgpt-demo

  • Less feature-rich compared to chatbox
  • Limited customization options for user interface
  • Fewer integrations with external services

Code Comparison

chatgpt-demo:

export async function generateAnswer(params: GenerateAnswerParams) {
  const { prompt, options, systemPrompt } = params;
  const completionParams: CreateChatCompletionRequest = {
    model: options?.model || 'gpt-3.5-turbo',
    messages: [
      { role: 'system', content: systemPrompt || 'You are ChatGPT, a large language model trained by OpenAI.' },
      { role: 'user', content: prompt },
    ],
  };
}

chatbox:

async function* streamAssistantMessage(
  conversation: Conversation,
  userMessage: Message,
  abortSignal: AbortSignal,
) {
  const messages = conversation.messages.concat(userMessage)
  const prompt = buildPrompt(messages)
  yield* streamCompletion(prompt, abortSignal)
}

The code snippets show different approaches to generating responses. chatgpt-demo uses a more straightforward method with predefined roles, while chatbox implements a streaming approach for assistant messages.

AI chat for every model.

Pros of chatbot-ui

  • More extensive UI customization options
  • Better support for multiple chat models and providers
  • Advanced features like conversation branching and export

Cons of chatbot-ui

  • Steeper learning curve for setup and configuration
  • Requires more system resources to run smoothly
  • Less focus on cross-platform compatibility

Code Comparison

chatbot-ui:

const ChatMessage = ({ message, ...props }: Props) => {
  return (
    <div
      className={`flex flex-col ${
        message.role === "assistant" ? "items-start" : "items-end"
      }`}
      {...props}
    >
      {/* Message content rendering */}
    </div>
  );
};

chatbox:

const ChatMessage = ({ message }) => {
  return (
    <div className={`chat-message ${message.role}`}>
      <div className="message-content">{message.content}</div>
    </div>
  );
};

The code snippets show that chatbot-ui uses TypeScript and has more complex styling logic, while chatbox uses simpler JavaScript and CSS classes for message rendering.

An amazing UI for OpenAI's ChatGPT (Website + Windows + MacOS + Linux)

Pros of BetterChatGPT

  • More feature-rich interface with advanced options like conversation forking and merging
  • Supports multiple AI models, including GPT-3.5 and GPT-4
  • Offers a web-based interface, making it accessible across different platforms

Cons of BetterChatGPT

  • May have a steeper learning curve due to its more complex interface
  • Requires an OpenAI API key, which may not be accessible to all users

Code Comparison

BetterChatGPT (React):

const Conversation = ({ selectedConversation, messages, onSendMessage }) => {
  // Component logic
};

Chatbox (Vue):

<template>
  <div class="conversation">
    <!-- Conversation UI -->
  </div>
</template>

<script>
export default {
  // Component logic
}
</script>

Both projects use modern JavaScript frameworks, with BetterChatGPT utilizing React and Chatbox using Vue. This difference in frameworks may impact the development experience and performance characteristics of each application.

10,683

A self-hosted, offline, ChatGPT-like chatbot. Powered by Llama 2. 100% private, with no data leaving your device. New: Code Llama support!

Pros of llama-gpt

  • Focuses on running LLaMA models locally, offering privacy and offline capabilities
  • Provides a user-friendly web interface for interacting with the model
  • Designed for easy setup and deployment on personal hardware

Cons of llama-gpt

  • Limited to LLaMA models, while chatbox supports multiple AI providers
  • May require more powerful hardware to run efficiently compared to chatbox
  • Less flexibility in terms of customization and integration with other services

Code Comparison

llama-gpt (Python):

@app.route("/api/chat", methods=["POST"])
def chat():
    message = request.json["message"]
    response = llm(message)
    return jsonify({"response": response})

chatbox (JavaScript):

ipcMain.handle('chat-process', async (e, { prompt, options }) => {
  const response = await chatProcess(prompt, options)
  return response
})

Both projects handle chat requests, but llama-gpt uses a Flask-like web framework, while chatbox utilizes Electron's IPC for communication between main and renderer processes.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

English | 简体中文

This is the repository for the Chatbox Community Edition, open-sourced under the GPLv3 license. For most users, I recommend using the Chatbox Official Edition (closed-source). It's still completely free, easy to install, and supports more of the latest features. You can get it below:

Download for Desktop

Windows MacOS Linux

Setup.exe

Intel

M1/M2

AppImage

Download for iOS/Android

.APK

For more information: chatboxai.app


Chatbox (Community Edition)

Your Ultimate AI Copilot on the Desktop.
Chatbox is a desktop client for ChatGPT, Claude and other LLMs, available on Windows, Mac, Linux

macOS Windows Linux Downloads Twitter

Chatbox - Better UI & Desktop App for ChatGPT, Claude and other LLMs. | Product Hunt

Features

  • Local Data Storage
    :floppy_disk: Your data remains on your device, ensuring it never gets lost and maintains your privacy.

  • No-Deployment Installation Packages
    :package: Get started quickly with downloadable installation packages. No complex setup necessary!

  • Support for Multiple LLM Providers
    :gear: Seamlessly integrate with a variety of cutting-edge language models:

    • OpenAI (ChatGPT)
    • Azure OpenAI
    • Claude
    • Google Gemini Pro
    • Ollama (enable access to local models like llama2, Mistral, Mixtral, codellama, vicuna, yi, and solar)
    • ChatGLM-6B
  • Image Generation with Dall-E-3
    :art: Create the images of your imagination with Dall-E-3.

  • Enhanced Prompting
    :speech_balloon: Advanced prompting features to refine and focus your queries for better responses.

  • Keyboard Shortcuts
    :keyboard: Stay productive with shortcuts that speed up your workflow.

  • Markdown, Latex & Code Highlighting
    :scroll: Generate messages with the full power of Markdown and Latex formatting, coupled with syntax highlighting for various programming languages, enhancing readability and presentation.

  • Prompt Library & Message Quoting
    :books: Save and organize prompts for reuse, and quote messages for context in discussions.

  • Streaming Reply
    :arrow_forward: Provide rapid responses to your interactions with immediate, progressive replies.

  • Ergonomic UI & Dark Theme
    :new_moon: A user-friendly interface with a night mode option for reduced eye strain during extended use.

  • Team Collaboration
    :busts_in_silhouette: Collaborate with ease and share OpenAI API resources among your team. Learn More

  • Cross-Platform Availability
    :computer: Chatbox is ready for Windows, Mac, Linux users.

  • Access Anywhere with the Web Version
    :globe_with_meridians: Use the web application on any device with a browser, anywhere.

  • iOS & Android
    :phone: Use the mobile applications that will bring this power to your fingertips on the go.

  • Multilingual Support
    :earth_americas: Catering to a global audience by offering support in multiple languages:

    • English
    • 简体中文 (Simplified Chinese)
    • 繁體中文 (Traditional Chinese)
    • 日本語 (Japanese)
    • 한국어 (Korean)
    • Français (French)
    • Deutsch (German)
    • Русский (Russian)
  • And More...
    :sparkles: Constantly enhancing the experience with new features!

FAQ

Why I made Chatbox?

I developed Chatbox initially because I was debugging some prompts and found myself in need of a simple and easy-to-use prompt and API debugging tool. I thought there might be more people who needed such a tool, so I open-sourced it.

At first, I didn't know that it would be so popular. I listened to the feedback from the open-source community and continued to develop and improve it. Now, it has become a very useful AI desktop application. There are many users who love Chatbox, and they not only use it for developing and debugging prompts, but also for daily chatting, and even to do some more interesting things like using well-designed prompts to make AI play various professional roles to assist them in everyday work...

How to Contribute

Any form of contribution is welcome, including but not limited to:

  • Submitting issues
  • Submitting pull requests
  • Submitting feature requests
  • Submitting bug reports
  • Submitting documentation revisions
  • Submitting translations
  • Submitting any other forms of contribution

Build Instructions

  1. Clone the repository from Github
git clone https://github.com/Bin-Huang/chatbox.git
  1. Install the required dependencies
npm install
  1. Start the application (in development mode)
npm run dev
  1. Build the application, package the installer for current platform
npm run package
  1. Build the application, package the installer for all platforms
npm run package:all

Buy Me a Coffee

"Buy Me A Coffee"

PaypalWechat PayAli Pay
Paypal

Star History

Star History Chart

Contact

Twitter | Email | Blog

License

LICENSE