SUP_GoldBees_Frontend/CHATBOT_README.md
2026-02-01 13:01:28 +00:00

716 B
Raw Permalink Blame History

QuantFortune Chatbot Widget

Overview

  • Frontend-only chat widget with deterministic replies.
  • Uses a fixed Q&A map in src/components/chat/qaMap.ts.
  • No backend or AI calls.

How to extend later with AI

  1. Replace matchAnswer() in qaMap.ts with a backend call.
  2. Keep outOfScopeAnswer as a fallback.
  3. Add streaming responses if needed (SSE / WebSocket).
  4. Store chat history server-side if needed.

Files

  • src/components/chat/ChatWidget.tsx
  • src/components/chat/ChatButton.tsx
  • src/components/chat/MessageBubble.tsx
  • src/components/chat/qaMap.ts

Notes

  • Suggested question chips are derived from the Q&A map.
  • Exact match or keyword match only.
  • Typing delay is simulated (500800ms).