Initialize the index creator with optional custom configuration.
(self, config_path: Optional[str] = None)
| 37 | """Interactive index creation utility.""" |
| 38 | |
| 39 | def __init__(self, config_path: Optional[str] = None): |
| 40 | """Initialize the index creator with optional custom configuration.""" |
| 41 | self.db = ChatDatabase() |
| 42 | self.config = self._load_config(config_path) |
| 43 | |
| 44 | # Initialize Ollama client |
| 45 | self.ollama_client = OllamaClient() |
| 46 | self.ollama_config = { |
| 47 | "generation_model": "qwen3:0.6b", |
| 48 | "embedding_model": "qwen3:0.6b" |
| 49 | } |
| 50 | |
| 51 | # Initialize indexing pipeline |
| 52 | self.pipeline = IndexingPipeline( |
| 53 | self.config, |
| 54 | self.ollama_client, |
| 55 | self.ollama_config |
| 56 | ) |
| 57 | |
| 58 | def _load_config(self, config_path: Optional[str] = None) -> dict: |
| 59 | """Load configuration from file or use default.""" |
nothing calls this directly
no test coverage detected