MCPcopy Index your code
hub / github.com/PromtEngineer/localGPT / __init__

Method __init__

create_index_script.py:39–56  ·  view source on GitHub ↗

Initialize the index creator with optional custom configuration.

(self, config_path: Optional[str] = None)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 4

_load_configMethod · 0.95
ChatDatabaseClass · 0.90
OllamaClientClass · 0.90
IndexingPipelineClass · 0.90

Tested by

no test coverage detected