mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
update document sdk (#2485)
### Type of change #2485 - [x] Performance Improvement
This commit is contained in:
committed by
GitHub
parent
2324b88579
commit
6c6380d27a
@ -499,6 +499,7 @@ def list_chunk(tenant_id):
|
||||
"content_with_weight": "content",
|
||||
"doc_id": "document_id",
|
||||
"important_kwd": "important_keywords",
|
||||
"img_id":"image_id",
|
||||
}
|
||||
renamed_chunk = {}
|
||||
for key, value in chunk.items():
|
||||
@ -560,12 +561,16 @@ def create(tenant_id):
|
||||
"content_with_weight": "content",
|
||||
"doc_id": "document_id",
|
||||
"important_kwd": "important_keywords",
|
||||
"kb_id":"knowledge_base_id",
|
||||
"kb_id":"dataset_id",
|
||||
"create_timestamp_flt":"create_timestamp",
|
||||
"create_time": "create_time",
|
||||
"document_keyword":"document",
|
||||
}
|
||||
renamed_chunk = {}
|
||||
for key, value in d.items():
|
||||
new_key = key_mapping.get(key, key)
|
||||
renamed_chunk[new_key] = value
|
||||
if key in key_mapping:
|
||||
new_key = key_mapping.get(key, key)
|
||||
renamed_chunk[new_key] = value
|
||||
|
||||
return get_json_result(data={"chunk": renamed_chunk})
|
||||
# return get_json_result(data={"chunk_id": chunk_id})
|
||||
|
||||
Reference in New Issue
Block a user