Change function name get_kg_context to _get_kg_context
This commit is contained in:
parent
3146309fde
commit
1e03888cef
1 changed files with 3 additions and 3 deletions
|
|
@ -1156,7 +1156,7 @@ async def mix_kg_vector_query(
|
||||||
)
|
)
|
||||||
|
|
||||||
# 2. Execute knowledge graph and vector searches in parallel
|
# 2. Execute knowledge graph and vector searches in parallel
|
||||||
async def get_kg_context():
|
async def _get_kg_context():
|
||||||
try:
|
try:
|
||||||
hl_keywords, ll_keywords = await get_keywords_from_query(
|
hl_keywords, ll_keywords = await get_keywords_from_query(
|
||||||
query, query_param, global_config, hashing_kv
|
query, query_param, global_config, hashing_kv
|
||||||
|
|
@ -1194,13 +1194,13 @@ async def mix_kg_vector_query(
|
||||||
return context
|
return context
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.error(f"Error in get_kg_context: {str(e)}")
|
logger.error(f"Error in _get_kg_context: {str(e)}")
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# 3. Execute both retrievals in parallel
|
# 3. Execute both retrievals in parallel
|
||||||
kg_context, vector_context = await asyncio.gather(
|
kg_context, vector_context = await asyncio.gather(
|
||||||
get_kg_context(), _get_vector_context(query, chunks_vdb, query_param, tokenizer)
|
_get_kg_context(), _get_vector_context(query, chunks_vdb, query_param, tokenizer)
|
||||||
)
|
)
|
||||||
|
|
||||||
# 4. Merge contexts
|
# 4. Merge contexts
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue