0.1.2 • Published 10 months ago

@yugasun/chatbot v0.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

ChatBot

npm GitHub Repo stars Lit TypeScript Vite Build

ChatBot is a chat robot that simplifies the usage of chat GPT tools like ChatGPT, and can be integrated into any framework (e.g., Vue, React, Angular) for easy implementation.

Feature

  • 🚀 Can be used in any framework, such as Vue, React, Angular, etc.
  • 🌟 Works with CDNs
  • 🎨 Customizable style
  • 🍺 Type safe with TypeScript
  • 🌍 I18n ready

Demo

Live Demo

Usage

For framework use (Vue, React, Angular, etc.)

Install

pnpm install @yugasun/chatbot

Then import it in entry file:

import '@yugasun/chatbot';

For Vue, refer to: Vue Demo For React, refer to: React Demo

To enable stream mode, you need to add the stream attribute to the chat-bot tag.

<chat-bot stream></chat-bot>

For pure HTML use

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <title>ChatBot</title>
        <script
            type="module"
            src="https://cdn.skypack.dev/@yugasun/chatbot"
        ></script>
    </head>
    <body>
        <chat-bot></chat-bot>
    </body>
</html>

Develop

# 0. Clone project
git clone https://github.com/yugasun/chatbot

# 1. Install dependencies
pnpm install

# 2. Start develop server
pnpm dev

# 3. Build
pnpm build

License

MIT @yugasun