LarFii commited on
Commit
c903e60
·
1 Parent(s): 69a2805

Update get_keywords_from_query

Browse files
Files changed (1) hide show
  1. lightrag/operate.py +2 -1
lightrag/operate.py CHANGED
@@ -836,7 +836,8 @@ async def get_keywords_from_query(
836
  Returns:
837
  A tuple containing (high_level_keywords, low_level_keywords)
838
  """
839
- if not query_param.hl_keywords.empty() and not query_param.ll_keywords.empty():
 
840
  return query_param.hl_keywords, query_param.ll_keywords
841
 
842
  # Extract keywords using extract_keywords_only function which already supports conversation history
 
836
  Returns:
837
  A tuple containing (high_level_keywords, low_level_keywords)
838
  """
839
+ # Check if pre-defined keywords are already provided
840
+ if query_param.hl_keywords or query_param.ll_keywords:
841
  return query_param.hl_keywords, query_param.ll_keywords
842
 
843
  # Extract keywords using extract_keywords_only function which already supports conversation history