feat: Implement initial RAG chatbot core functionalities including PDF processing, vector store, and RAG pipeline.
b80cddf
| """ | |
| Basic tests for PDF processor | |
| """ | |
| import pytest | |
| from utils.pdf_processor import PDFProcessor | |
| def test_pdf_processor_init(): | |
| """Test PDF processor initialization""" | |
| processor = PDFProcessor() | |
| assert processor is not None | |
| assert processor.text_splitter is not None | |
| def test_chunk_text(): | |
| """Test text chunking""" | |
| processor = PDFProcessor() | |
| sample_text = "This is a test. " * 100 | |
| chunks = processor.chunk_text(sample_text) | |
| assert len(chunks) > 0 | |
| assert all(isinstance(chunk, str) for chunk in chunks) | |
| # Note: Full PDF tests require actual PDF files | |
| # Add integration tests with sample PDFs as needed | |