mirror of
https://github.com/HKUDS/LightRAG.git
synced 2026-01-07 20:29:56 +00:00
fix JSON parsing error
This commit is contained in:
parent
c31a2654f9
commit
eda9d5abeb
@ -479,6 +479,7 @@ async def kg_query(
|
||||
print(result)
|
||||
try:
|
||||
# json_text = locate_json_string_body_from_string(result) # handled in use_model_func
|
||||
result = re.search(r"{.*}", json_text, re.DOTALL)
|
||||
keywords_data = json.loads(result)
|
||||
hl_keywords = keywords_data.get("high_level_keywords", [])
|
||||
ll_keywords = keywords_data.get("low_level_keywords", [])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user