fix: remove api_key from config.yaml, read from EMBED_API_KEY env var; unify config path constant
This commit is contained in:
+2
-2
@@ -13,7 +13,7 @@ if sys.stdout.encoding != "utf-8":
|
||||
# 确保 src 在路径中
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
from src.core.config import load_config
|
||||
from src.core.config import load_config, DEFAULT_CONFIG_PATH
|
||||
from src.core.db import VectorDB
|
||||
from src.core.embedder import create_embedder
|
||||
from src.core.ingest import DocumentIngestor
|
||||
@@ -23,7 +23,7 @@ from src.core.search import Searcher
|
||||
app = typer.Typer(name="md-vector-db", help="Markdown 文档向量数据库管理工具")
|
||||
|
||||
|
||||
def _get_components(config_path: str = "config.yaml"):
|
||||
def _get_components(config_path: str = DEFAULT_CONFIG_PATH):
|
||||
"""初始化所有组件."""
|
||||
cfg = load_config(config_path)
|
||||
db = VectorDB(persist_dir=cfg.chroma.persist_dir)
|
||||
|
||||
Reference in New Issue
Block a user