mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
add API for tenant function (#2866)
### What problem does this PR solve? feat: API access key management https://github.com/infiniflow/ragflow/issues/2846 feat: Render markdown file with remark-loader https://github.com/infiniflow/ragflow/issues/2846 ### Type of change - [x] New Feature (non-breaking change which adds functionality)
This commit is contained in:
@ -49,6 +49,7 @@ class RecursiveAbstractiveProcessing4TreeOrganizedRetrieval:
|
||||
layers = [(0, len(chunks))]
|
||||
start, end = 0, len(chunks)
|
||||
if len(chunks) <= 1: return
|
||||
chunks = [(s, a) for s, a in chunks if len(a) > 0]
|
||||
|
||||
def summarize(ck_idx, lock):
|
||||
nonlocal chunks
|
||||
@ -64,6 +65,7 @@ class RecursiveAbstractiveProcessing4TreeOrganizedRetrieval:
|
||||
print("SUM:", cnt)
|
||||
embds, _ = self._embd_model.encode([cnt])
|
||||
with lock:
|
||||
if not len(embds[0]): return
|
||||
chunks.append((cnt, embds[0]))
|
||||
except Exception as e:
|
||||
print(e, flush=True)
|
||||
|
||||
Reference in New Issue
Block a user