-
Notifications
You must be signed in to change notification settings - Fork 1
Introduced multiple enhancements #32
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
Conversation
…ntend pieces and minor cleanup for docker publish to handle irrelevant tag creation
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.
Pull request overview
This pull request introduces three major enhancements to the LLM interface: a conversation history database, configurable temperature and max_tokens parameters, and security improvements based on CodeQL recommendations.
Key Changes
- Adds SQLite-based conversation persistence with create, load, delete, and search capabilities for both Chat and RAG interfaces
- Implements temperature and max_tokens controls throughout the UI and API stack, giving users fine-grained control over response generation
- Enhances security with filename sanitization, path traversal protection, ReDoS vulnerability fixes, and improved input validation
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
| app/services/conversation_db.py | New SQLite conversation database service with CRUD operations for conversations and messages |
| app/frontend/components/conversation_sidebar.py | New sidebar component for managing conversation history with load/save/delete functionality |
| app/services/ollama.py | Added max_tokens parameter support via num_predict option |
| app/services/rag_service.py | Added temperature and max_tokens parameters to query method, improved JSON parsing with fallback |
| app/backend/models/api_models.py | Added max_tokens field to ChatRequestEnhanced and temperature/max_tokens to RAGQueryRequestEnhanced |
| app/backend/api/chat.py | Propagated max_tokens parameter through chat streaming endpoints |
| app/backend/api/rag.py | Added file upload security with sanitization, size validation, and max_tokens support |
| app/frontend/pages/chat_page.py | Integrated conversation sidebar, added max_tokens slider, updated labels |
| app/frontend/pages/rag_page.py | Integrated conversation sidebar, added temperature/max_tokens sliders, updated labels |
| app/frontend/services/chat_service.py | Added max_tokens parameter to all chat service methods |
| app/frontend/services/rag_service.py | Added temperature and max_tokens parameters to stream_rag_query |
| app/frontend/components/streaming_handler.py | Propagated temperature and max_tokens through streaming handlers |
| main.py | Added comprehensive file upload security with sanitization and validation functions |
| app/services/vllm_service.py | Fixed shell injection vulnerability, added PID validation |
| app/frontend/utils/text_processing.py | Fixed ReDoS vulnerability with length-limited regex pattern |
| app/frontend/utils/text_processing_clean.py | Fixed ReDoS vulnerability with length-limited regex pattern |
| streamlit_app.py | Removed emoji decorators from page names for cleaner UI |
| README.md | Updated feature list to remove emoji decorators and add generation controls |
| .github/workflows/docker-publish.yml | Removed redundant semantic versioning patterns |
| app/services/init.py | New exports for conversation database components |
| app/frontend/components/init.py | Added conversation sidebar exports |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
📋 Description
🔧 Type of Change
🚀 What's Changed
🧪 Testing
✅ Checklist