From 8ee43b9324ca58d1cb67e45ce1a56c3238ebb91e Mon Sep 17 00:00:00 2001 From: Christophe Bornet Date: Mon, 22 Jul 2024 16:23:27 +0200 Subject: [PATCH] Deprecate targets_table in GraphStore --- .../ragstack_knowledge_store/graph_store.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libs/knowledge-store/ragstack_knowledge_store/graph_store.py b/libs/knowledge-store/ragstack_knowledge_store/graph_store.py index 1401e665e..b27737bc7 100644 --- a/libs/knowledge-store/ragstack_knowledge_store/graph_store.py +++ b/libs/knowledge-store/ragstack_knowledge_store/graph_store.py @@ -1,4 +1,5 @@ import json +import logging import re import secrets from dataclasses import asdict, dataclass, field, is_dataclass @@ -24,6 +25,8 @@ from .embedding_model import EmbeddingModel from .links import Link +logger = logging.getLogger(__name__) + CONTENT_ID = "content_id" @@ -125,10 +128,17 @@ def __init__( embedding: EmbeddingModel, *, node_table: str = "graph_nodes", + targets_table: str = "", session: Optional[Session] = None, keyspace: Optional[str] = None, setup_mode: SetupMode = SetupMode.SYNC, ): + if targets_table: + logger.warning( + "The 'targets_table' argument is deprecated " + "and will be removed in future versions" + ) + session = check_resolve_session(session) keyspace = check_resolve_keyspace(keyspace)