rename some attributes in document sdk (#2481)

### What problem does this PR solve?

#1102

### Type of change

- [x] Performance Improvement

---------

Co-authored-by: Kevin Hu <kevinhu.sh@gmail.com>
This commit is contained in:
JobSmithManipulation
2024-09-18 18:46:37 +08:00
committed by GitHub
parent 01acc3fd5a
commit 2b0dc01a88
6 changed files with 66 additions and 62 deletions

View File

@@ -22,7 +22,7 @@ class Chunk(Base):
Delete the chunk in the document.
"""
res = self.post('/doc/chunk/rm',
{"doc_id": self.document_id, 'chunk_ids': [self.id]})
{"document_id": self.document_id, 'chunk_ids': [self.id]})
res = res.json()
if res.get("retmsg") == "success":
return True
@@ -34,13 +34,13 @@ class Chunk(Base):
"""
res = self.post('/doc/chunk/set',
{"chunk_id": self.id,
"kb_id": self.knowledgebase_id,
"knowledgebase_id": self.knowledgebase_id,
"name": self.document_name,
"content_with_weight": self.content,
"important_kwd": self.important_keywords,
"content": self.content,
"important_keywords": self.important_keywords,
"create_time": self.create_time,
"create_timestamp_flt": self.create_timestamp_float,
"doc_id": self.document_id,
"document_id": self.document_id,
"status": self.status,
})
res = res.json()