mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Feat: Redesign and refactor agent module (#9113)
### What problem does this PR solve? #9082 #6365 <u> **WARNING: it's not compatible with the older version of `Agent` module, which means that `Agent` from older versions can not work anymore.**</u> ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -274,7 +274,7 @@ class KGSearch(Dealer):
|
||||
return {
|
||||
"chunk_id": get_uuid(),
|
||||
"content_ltks": "",
|
||||
"content_with_weight": ents + relas + self._community_retrival_([n for n, _ in ents_from_query], filters, kb_ids, idxnms,
|
||||
"content_with_weight": ents + relas + self._community_retrieval_([n for n, _ in ents_from_query], filters, kb_ids, idxnms,
|
||||
comm_topn, max_token),
|
||||
"doc_id": "",
|
||||
"docnm_kwd": "Related content in Knowledge Graph",
|
||||
@ -288,7 +288,7 @@ class KGSearch(Dealer):
|
||||
"positions": [],
|
||||
}
|
||||
|
||||
def _community_retrival_(self, entities, condition, kb_ids, idxnms, topn, max_token):
|
||||
def _community_retrieval_(self, entities, condition, kb_ids, idxnms, topn, max_token):
|
||||
## Community retrieval
|
||||
fields = ["docnm_kwd", "content_with_weight"]
|
||||
odr = OrderByExpr()
|
||||
|
||||
Reference in New Issue
Block a user