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

24 lines
716 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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).