@yugasun/chatbot
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

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

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

Demo

Live Demo

chatbot

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

Package Sidebar

Install

npm i @yugasun/chatbot

Weekly Downloads

1

Version

0.1.2

License

MIT

Unpacked Size

1.68 MB

Total Files

49

Last publish

Collaborators

  • yugasun