-
Notifications
You must be signed in to change notification settings - Fork 0
release-2.0.0 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
release-2.0.0 #11
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
7500d51
Remove welcome.lottie file and update Welcome component to use welcom…
amankrs21 d934e2f
Update README and ZZZ.txt with project details and Azure deployment i…
amankrs21 c626898
Add feedback API endpoints for submitting and retrieving feedback
amankrs21 c7c4c0d
Add ChatFeedback component for user feedback on chat messages
amankrs21 1a2af75
Add feedback handling to ChatLayout component with like/dislike funct…
amankrs21 bc624fc
Improve error handling in Login component and manage loading state in…
amankrs21 0ee9d9b
Add Feedback component and route for displaying user feedback
amankrs21 c31a406
Add UI deployment workflow for React app to Cloudflare Pages
amankrs21 d96dbcc
Enhance feedback handling in ChatLayout component with async dislike …
amankrs21 03d7cf0
Update Feedback component to use small table size for improved layout
amankrs21 f6e2e61
Add Chat.css for chat layout styling and message formatting
amankrs21 cb4d6ce
Refactor Router component to correct route paths and ensure proper na…
amankrs21 9f0f6a8
Add ChatMainLayout component with chat functionality and message hand…
amankrs21 aff6547
Refactor ChatMainLayout to initialize messages state as empty array a…
amankrs21 f916331
Enhance ChatInput component by adding loading state support, adjustin…
amankrs21 71e1608
Add ChatInfoPop component for user manual and chat features overview
amankrs21 5e22ecc
Add ChatMessageBot and ChatMessageUser components for handling bot an…
amankrs21 d18a2b8
Refactor ChatHome component to enhance message handling, feedback fea…
amankrs21 24bdf6e
Update maxLength attribute in ChatInput component and remove unused C…
amankrs21 20d9f1c
Remove unused ChatLayout import from ChatMainLayout component
amankrs21 2328752
Refactor imports in App, Router, and index files for consistency and …
amankrs21 41c0a93
Move scrollbar styles to index.html and remove main.css
amankrs21 9339b29
Refactor code structure for improved readability and maintainability
amankrs21 e278e0e
Implement Login component and remove Welcome component and styles
amankrs21 241d53f
Add LogoutPop component for logout confirmation dialog; remove Login …
amankrs21 bbb087f
Remove AppHeader, MainLayout, and NavbarActions components to streaml…
amankrs21 1c1be62
Refactor PrivateRoutes and AuthContext for improved loading state han…
amankrs21 06045c2
Add Header component with navigation and logout functionality; includ…
amankrs21 d751bb0
Refactor import statements in Login component for improved readability
amankrs21 47c04ac
Add Account component for user account management; include placeholde…
amankrs21 9fd84ff
Update Loading component background color for improved visibility
amankrs21 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,107 @@ | ||
| # GenAIChatBot | ||
| # 🤖 GENAI-RAG-BOT | ||
|
|
||
| A production-ready Generative AI Assistant built with Retrieval-Augmented Generation (RAG) architecture using **FastAPI**, **ChromaDB**, and **LLMs** (e.g., Mistral). This bot answers domain-specific queries using a vector store and never hallucinates — it only replies using relevant documents from its database. | ||
|
|
||
| --- | ||
|
|
||
| ## 🚀 Features | ||
|
|
||
| * 🔍 **Context-aware Retrieval** via [ChromaDB](https://www.trychroma.com/) | ||
| * 📚 **LangChain Integration**: Seamlessly chains LLM calls with retrieval, enabling advanced workflows like summarization, Q&A, and document parsing. | ||
| * 📚 **Document Embeddings**: Store and retrieve documents in vector format using cohere (embed-english-v3.0) | ||
| * 🧠 **LLM-Powered Responses** (e.g., Mistral via `mistral.ai`) | ||
| * 🔐 Strict: Only responds using data retrieved from vector store | ||
| * 💾 Source-aware: Supports citation-style responses | ||
| * 🧼 Clean **FastAPI** backend with CORS support | ||
| * ⚙️ Ready for deployment on Azure App Service | ||
| * 📦 Modular Router + Configured Error Handlers + Health Endpoint | ||
|
|
||
| --- | ||
|
|
||
| ## 🧠 How It Works | ||
|
|
||
| 1. **User query** → `/api/chat` | ||
| 2. **Query embedding** → Compare with ChromaDB document embeddings | ||
| 3. **Retrieve top-k chunks** → Pass to the LLM as context | ||
| 4. **Generate response** → Only if relevant chunks exist | ||
| 5. **No relevant data?** → “Sorry, I don’t have any information about this.” | ||
|
|
||
| --- | ||
|
|
||
| ## ⚙️ Environment Variables | ||
|
|
||
| Create a `.env` file: | ||
|
|
||
| ```env | ||
| PORT=your-port | ||
| HOST=http://localhost:5000 | ||
| CORS_URL=http://localhost:5173 | ||
| JWT_SECRET=your-secret | ||
| MONGO_URL=your-mongo-url | ||
| MISTRAL_MODEL_NAME=your-model-name | ||
| MISTRAL_API_KEY=your-mistral-api-key | ||
| COHERE_API_KEY=your-cohere-api-key | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## 💻 Local Development | ||
|
|
||
| ```bash | ||
| # 1. Clone the repo | ||
| git clone https://github.com/amankrs21/GENAI-RAG-BOT.git | ||
| cd GENAI-RAG-BOT | ||
|
|
||
| # 2. Create a virtual environment | ||
| python -m venv venv | ||
| source venv/bin/activate # On Windows: venv\Scripts\activate | ||
|
|
||
| # 3. Install dependencies | ||
| pip install -r requirements.txt | ||
|
|
||
| # 4. Run the server | ||
| uvicorn main:app --reload | ||
| ``` | ||
|
|
||
| Then visit: [http://localhost:5000/health](http://localhost:5000/health) | ||
|
|
||
| --- | ||
|
|
||
| ## 🛡️ Agent Behavior | ||
|
|
||
| This bot **does not hallucinate**. | ||
|
|
||
| > It only replies based on retrieved chunks from the ChromaDB vector store. | ||
| > If nothing relevant is found, it replies: | ||
| > *“Sorry, I don’t have any information about this.”* | ||
|
|
||
| --- | ||
|
|
||
| ## 📦 Requirements | ||
|
|
||
| * Python 3.9+ | ||
| * FastAPI | ||
| * Uvicorn | ||
| * ChromaDB | ||
| * Requests | ||
| * Uplinks for Mistral/LLM calls | ||
|
|
||
| (See `requirements.txt` for full list) | ||
|
|
||
| --- | ||
|
|
||
| ## 📄 License | ||
|
|
||
| This project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details. | ||
|
|
||
| --- | ||
|
|
||
| ## 🙋♂️ Author | ||
|
|
||
| Built with ❤️ by [**@amankrs21**](https://github.com/amankrs21) | ||
|
|
||
| --- | ||
|
|
||
| ## ✨ Want to Contribute? | ||
|
|
||
| PRs are welcome! This is just the beginning of RAG-native GenAI tooling. |
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
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
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo in 'DEPLOYEMENT'; please correct it to 'DEPLOYMENT'.