Load some sample documents for testing
()
| 107 | pass |
| 108 | |
| 109 | def load_sample_documents(): |
| 110 | """Load some sample documents for testing""" |
| 111 | SimpleRAGHandler.documents = [ |
| 112 | { |
| 113 | 'content': 'Azul is a terminal web browser written in Rust with AI-powered features including chat, RAG, and memory integration.', |
| 114 | 'metadata': {'source': 'README', 'type': 'project'}, |
| 115 | 'score': 1.0 |
| 116 | }, |
| 117 | { |
| 118 | 'content': 'mem-layer is a graph-based memory management system for AI models. It stores nodes and relationships in a graph database.', |
| 119 | 'metadata': {'source': 'docs', 'type': 'integration'}, |
| 120 | 'score': 1.0 |
| 121 | }, |
| 122 | { |
| 123 | 'content': 'The browser supports multiple search engines including DuckDuckGo, Wikipedia, arXiv, and Google Scholar.', |
| 124 | 'metadata': {'source': 'features', 'type': 'documentation'}, |
| 125 | 'score': 1.0 |
| 126 | }, |
| 127 | { |
| 128 | 'content': 'Press r to open RAG panel, m for memory panel, c for chat, and ? for help.', |
| 129 | 'metadata': {'source': 'keybindings', 'type': 'documentation'}, |
| 130 | 'score': 1.0 |
| 131 | }, |
| 132 | ] |
| 133 | |
| 134 | def run_server(port=8765): |
| 135 | """Run the simple RAG server""" |