From 50ebcedf37dd9d50f340addd64783878db4196ba Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Fri, 15 Aug 2025 10:54:11 +0100 Subject: [PATCH] fix: natural_language_retriever.py --- cognee/modules/retrieval/natural_language_retriever.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cognee/modules/retrieval/natural_language_retriever.py b/cognee/modules/retrieval/natural_language_retriever.py index 276d64de3..38d19eb56 100644 --- a/cognee/modules/retrieval/natural_language_retriever.py +++ b/cognee/modules/retrieval/natural_language_retriever.py @@ -1,8 +1,7 @@ from typing import Any, Optional from cognee.shared.logging_utils import get_logger from cognee.infrastructure.databases.graph import get_graph_engine -from cognee.infrastructure.llm.get_llm_client import get_llm_client -from cognee.infrastructure.llm.prompts import render_prompt +from cognee.infrastructure.llm.LLMGateway import LLMGateway from cognee.modules.retrieval.base_retriever import BaseRetriever from cognee.modules.retrieval.exceptions import SearchTypeNotSupported from cognee.infrastructure.databases.graph.graph_db_interface import GraphDBInterface @@ -122,6 +121,10 @@ class NaturalLanguageRetriever(BaseRetriever): query. """ graph_engine = await get_graph_engine() + + if isinstance(graph_engine, (NetworkXAdapter)): + raise SearchTypeNotSupported("Natural language search type not supported.") + return await self._execute_cypher_query(query, graph_engine) async def get_completion(self, query: str, context: Optional[Any] = None) -> Any: