fix: fixes search test behaviour and adds comments to new pipeline executor logic (#1293)
<!-- .github/pull_request_template.md --> ## Description fix: fixes search test behaviour and adds comments to new pipeline executor logic ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
parent
d91b0f6aa3
commit
42d33fcd00
2 changed files with 5 additions and 3 deletions
|
|
@ -179,8 +179,10 @@ async def cognify(
|
||||||
"""
|
"""
|
||||||
tasks = await get_default_tasks(user, graph_model, chunker, chunk_size, ontology_file_path)
|
tasks = await get_default_tasks(user, graph_model, chunker, chunk_size, ontology_file_path)
|
||||||
|
|
||||||
|
# By calling get pipeline executor we get a function that will have the cognee_pipeline run in the background or a function that we will need to wait for
|
||||||
pipeline_executor_func = get_pipeline_executor(run_in_background=run_in_background)
|
pipeline_executor_func = get_pipeline_executor(run_in_background=run_in_background)
|
||||||
|
|
||||||
|
# Run the cognee_pipeline in the background or blocking based on executor
|
||||||
return await pipeline_executor_func(
|
return await pipeline_executor_func(
|
||||||
pipeline=cognee_pipeline,
|
pipeline=cognee_pipeline,
|
||||||
tasks=tasks,
|
tasks=tasks,
|
||||||
|
|
|
||||||
|
|
@ -113,17 +113,17 @@ async def main():
|
||||||
|
|
||||||
completion_gk = await cognee.search(
|
completion_gk = await cognee.search(
|
||||||
query_type=SearchType.GRAPH_COMPLETION,
|
query_type=SearchType.GRAPH_COMPLETION,
|
||||||
query_text="Next to which country is Germany located?",
|
query_text="Where is germany located, next to which country?",
|
||||||
save_interaction=True,
|
save_interaction=True,
|
||||||
)
|
)
|
||||||
completion_cot = await cognee.search(
|
completion_cot = await cognee.search(
|
||||||
query_type=SearchType.GRAPH_COMPLETION_COT,
|
query_type=SearchType.GRAPH_COMPLETION_COT,
|
||||||
query_text="Next to which country is Germany located?",
|
query_text="What is the country next to germany??",
|
||||||
save_interaction=True,
|
save_interaction=True,
|
||||||
)
|
)
|
||||||
completion_ext = await cognee.search(
|
completion_ext = await cognee.search(
|
||||||
query_type=SearchType.GRAPH_COMPLETION_CONTEXT_EXTENSION,
|
query_type=SearchType.GRAPH_COMPLETION_CONTEXT_EXTENSION,
|
||||||
query_text="Next to which country is Germany located?",
|
query_text="What is the name of the country next to germany",
|
||||||
save_interaction=True,
|
save_interaction=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue