Removed langchain and llama-cpp-python (not actively supported anymore) dependencies. Updated packages. Updated default dataset
5b2f824
| """ | |
| Custom Document class to replace langchain Document. | |
| """ | |
| from typing import Dict, Any, Optional | |
| class Document: | |
| """A simple document class with page_content and metadata.""" | |
| def __init__(self, page_content: str, metadata: Optional[Dict[str, Any]] = None): | |
| self.page_content = page_content | |
| self.metadata = metadata if metadata is not None else {} | |
| def __repr__(self): | |
| return f"Document(page_content='{self.page_content[:50]}...', metadata={self.metadata})" | |