feat: index semantic records in qdrant
This commit is contained in:
@@ -6,6 +6,7 @@ from tht.config import (
|
||||
ConfigError,
|
||||
PgvectorDirectConfig,
|
||||
PostgresDwhConfig,
|
||||
QdrantConfig,
|
||||
ThothRestDwhConfig,
|
||||
ThothVectorHttpConfig,
|
||||
load_config,
|
||||
@@ -237,6 +238,33 @@ resources:
|
||||
assert cfg.embeddings.dim == 1024
|
||||
|
||||
|
||||
def test_accepts_internal_qdrant_resource_contract(tmp_path):
|
||||
workspace = tmp_path / "workspace.yaml"
|
||||
workspace.write_text(
|
||||
"""
|
||||
dwh:
|
||||
type: postgres_direct
|
||||
connection: {database: analytics, schema: mart, user: reader, password: secret}
|
||||
resources:
|
||||
vector:
|
||||
engine: qdrant
|
||||
base_url: http://qdrant:6333
|
||||
collection: psd-clinical
|
||||
embeddings:
|
||||
provider: ollama_internal
|
||||
base_url: http://embedding:11434
|
||||
model: qwen3-embedding:0.6b
|
||||
dimensions: 1024
|
||||
"""
|
||||
)
|
||||
|
||||
cfg = load_config(workspace)
|
||||
|
||||
assert isinstance(cfg.vectors, QdrantConfig)
|
||||
assert cfg.vectors.base_url == "http://qdrant:6333"
|
||||
assert cfg.vectors.collection == "psd-clinical"
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("snippet", "pattern"),
|
||||
[
|
||||
|
||||
Reference in New Issue
Block a user