Fix issues in API (#3008)

### What problem does this PR solve?

Fix issues in API

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)

Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
This commit is contained in:
liuhua
2024-10-24 20:10:47 +08:00
committed by GitHub
parent 161c7a231b
commit 648f8e81d1
5 changed files with 187 additions and 205 deletions

View File

@ -70,7 +70,7 @@ class Document(Base):
return Chunk(self.rag,res["data"].get("chunk"))
raise Exception(res.get("message"))
def delete_chunks(self,ids:List[str]):
def delete_chunks(self,ids:List[str] = None):
res = self.rm(f"dataset/{self.dataset_id}/document/{self.id}/chunk",{"ids":ids})
res = res.json()
if res.get("code")!=0: