Add RAG chatbot (Pixel) and admin config panel#3754
Open
yiilinzhang wants to merge 23 commits intomasterfrom
Open
Add RAG chatbot (Pixel) and admin config panel#3754yiilinzhang wants to merge 23 commits intomasterfrom
yiilinzhang wants to merge 23 commits intomasterfrom
Conversation
…nto feature/louis-styling
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…demy/frontend into feature/louis-styling
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces 'Pixelbot,' a RAG-based chatbot for the Academy platform, which includes a draggable chat interface, new API endpoints, and an admin configuration panel for managing prompts and feedback URLs. The existing SICP chatbot was also refactored to support expansion and draggability. Feedback focuses on improving Markdown rendering by utilizing ReactMarkdown components instead of manual regex parsing and preventing a potential infinite loop in the configuration panel by selecting individual token fields for the useEffect dependency array.
src/pages/academy/adminPanel/subcomponents/PixelbotConfigPanel.tsx
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a new RAG-powered course chatbot (Pixel) for Academy pages, an admin panel for configuring Pixelbot prompts.
Changes
Key changes
src/commons/application/types/SessionTypes.ts— AddedpixelbotRoutingPrompt,pixelbotAnswerPrompt,feedbackUrlto session and course config typessrc/commons/sagas/RequestsSaga.ts— AddedgetPixelbotDocumentMapAPI callsrc/features/ragChat/api.ts— New API layer for RAG chat (initRagChat,sendRagMessage)src/pages/sicp/subcomponents/chatbot/ChatBox.tsx— Added expand/collapse supportsrc/pages/sicp/subcomponents/chatbot/Chatbot.tsx— Made draggablesrc/pages/academy/adminPanel/AdminPanel.tsx— Added Pixelbot Settings tab with new config fieldssrc/pages/academy/adminPanel/subcomponents/PixelbotConfigPanel.tsx— New admin panel for routing/answer prompts and feedback URLsrc/pages/academy/ragChatbot/RagChatBox.tsx— New chat UI with markdown rendering for RAG responsesType of change
How to test
Checklist