Spaces:
Runtime error
Runtime error
Commit History
-
refactor: Simplify codebase and consolidate testsβ
Julien Simon +1: Claude Opus 4.5- Extract shared utilities: get_top_chunk_index(), get_document_source() - Add HYBRID_ALPHA_UI_DEFAULT to centralize config - Simplify score normalization in HybridRetriever - Fix redundant branches in hybrid search - Simplify update_rag_controls() in handlers - Consolidate 10 fragmented test files into 4 main files - Remove duplicate fixtures and test code Net reduction: 115 lines (-853/+738) Test files: 28 β 20 Coverage: 98.86% Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>b39a3c2
-
refactor: Reorganize PDFs and improve error handlingβ
Julien Simon +1: Claude Opus 4.5- Move arXiv research papers to pdf_research/ directory - Add IEA energy reports and publications to pdf_energy/ - Update README to reflect new document content (clean energy, renewables, EVs, CCUS) - Create pdf symlink for default document source - Improve security by hiding internal error details from users in stream output - Replace print statements with proper logger.warning/error calls - Remove TEST_REVIEW.md and .DS_Store files - Add consistent trailing newlines to source files Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>ed005f8
-
Refactor codebase for improved maintainability and readabilityβ
Julien Simon- Split monolithic files into logical modules: * config.py: Centralized configuration constants * models.py: LLM and embedding model creation * vectorstore.py: Vectorstore management * retrievers.py: Retrieval strategies (MMR, similarity, hybrid) * qa_chain.py: QA chain wrapper with streaming support * utils.py: Utility functions (formatting, chat history) * ui/: UI components separated into app.py, components.py, handlers.py * cli.py: CLI entry point (replaces demo.py) - Improvements: * Removed dead code (format_sources function) * Fixed bug in format_context_with_highlight * Added error handling for empty collections * Fixed missing imports * Improved code organization and separation of concerns - All functionality preserved and testedc319b15