refactor: Rename query compute to query completion

Rename searching type from compute to completion

Refactor COG-656
This commit is contained in:
Igor Ilic 2024-12-13 17:03:38 +01:00
parent 11634cb58d
commit 924759a599
6 changed files with 6 additions and 6 deletions

View file

@ -14,13 +14,13 @@ from cognee.modules.users.permissions.methods import get_document_ids_for_user
from cognee.tasks.chunks import query_chunks
from cognee.tasks.graph import query_graph_connections
from cognee.tasks.summarization import query_summaries
from cognee.tasks.compute import query_compute
from cognee.tasks.completion import query_completion
class SearchType(Enum):
SUMMARIES = "SUMMARIES"
INSIGHTS = "INSIGHTS"
CHUNKS = "CHUNKS"
COMPUTE = "COMPUTE"
COMPLETION = "COMPLETION"
async def search(query_type: SearchType, query_text: str, user: User = None) -> list:
if user is None:
@ -52,7 +52,7 @@ async def specific_search(query_type: SearchType, query: str, user) -> list:
SearchType.SUMMARIES: query_summaries,
SearchType.INSIGHTS: query_graph_connections,
SearchType.CHUNKS: query_chunks,
SearchType.COMPUTE: query_compute,
SearchType.COMPLETION: query_completion,
}
search_task = search_tasks.get(query_type)

View file

@ -0,0 +1 @@
from .query_completion import query_completion

View file

@ -1,10 +1,10 @@
from cognee.infrastructure.databases.vector import get_vector_engine
from cognee.tasks.compute.exceptions import NoRelevantDataFound
from cognee.tasks.completion.exceptions import NoRelevantDataFound
from cognee.infrastructure.llm.get_llm_client import get_llm_client
from cognee.infrastructure.llm.prompts import read_query_prompt, render_prompt
async def query_compute(query: str) -> list:
async def query_completion(query: str) -> list:
"""
Parameters:
- query (str): The query string to compute.

View file

@ -1 +0,0 @@
from .query_compute import query_compute