1.0.1 • Published 10 months ago

nvx-paditech-webchat v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
10 months ago

Introduction

  • Mục đích: hỏi đáp về paditech, set lịch hẹn, ... Đây cũng là base repo để phát triển tiếp các bot về sau.

  • Base UI Chat Widget, bao gồm các tính năng:

    • Kéo thả mở rộng box chat
    • Setting ngôn ngữ, gửi custom message khi chọn ngôn ngữ xong
    • Ghi đè các reducer, không cache vào localStorage một vài trạng thái
    • Streaming text từ LLM

Installation

Cấu trúc repo: Tập trung vào ./src; custom chủ yếu ở src/storesrc/components/Widget/components/Conversation

src
  |-- components
        |-- Widget
             |-- components
                  |-- Conversation : các component liên quan đến hội thoại
                  |-- Launcher : icon nhỏ lúc close chat widget
             |-- test : thư mục test
  |-- scss: scss chung cho toàn project
  |-- store: store redux
        |-- actions: các actions
        |-- reducers: Các reducer (behavior, metadata, message)
  • Môi trường: Node 14.17.0 hoặc 14.0.0
ScriptDescription
npm installInstall all package
npm run devRun develop mode - webpack.dev.js
npm run buildBuild ra thư mục lib/ - sử dụng webpack.prod.js.

Chú ý:

  • Sau khi run build ra thư mục lib, copy các file (js, mp4, ...) vào cùng thư mục file html.

Features

  • Text Messages
  • Quick Replies
  • Images
  • Carousels
  • Markdown support
  • Persistent sessions
  • Typing indications
  • Smart delay between messages
  • Easy to import in a script tag or as a React Component