refactor: Rename query compute to query completion
Rename searching type from compute to completion Refactor COG-656
This commit is contained in:
parent
11634cb58d
commit
924759a599
6 changed files with 6 additions and 6 deletions
|
|
@ -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)
|
||||
|
|
|
|||
1
cognee/tasks/completion/__init__.py
Normal file
1
cognee/tasks/completion/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
from .query_completion import query_completion
|
||||
|
|
@ -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.
|
||||
|
|
@ -1 +0,0 @@
|
|||
from .query_compute import query_compute
|
||||
Loading…
Add table
Reference in a new issue