mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
Fix some issues in API (#2902)
### What problem does this PR solve? Fix some 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:
@ -35,7 +35,7 @@ class TestDocument(TestSdk):
|
||||
def test_update_document_with_success(self):
|
||||
"""
|
||||
Test updating a document with success.
|
||||
Update name or parser_method are supported
|
||||
Update name or chunk_method are supported
|
||||
"""
|
||||
rag = RAGFlow(API_KEY, HOST_ADDRESS)
|
||||
ds = rag.list_datasets(name="God")
|
||||
@ -43,7 +43,7 @@ class TestDocument(TestSdk):
|
||||
doc = ds.list_documents()
|
||||
doc = doc[0]
|
||||
if isinstance(doc, Document):
|
||||
res = doc.update({"parser_method":"manual","name":"manual.txt"})
|
||||
res = doc.update({"chunk_method":"manual","name":"manual.txt"})
|
||||
assert res is None, f"Failed to update document, error: {res}"
|
||||
else:
|
||||
assert False, f"Failed to get document, error: {doc}"
|
||||
|
||||
Reference in New Issue
Block a user