infiniflow / ragflow

RAGFlow is an open-source RAG (Retrieval-Augmented Generation) engine based on deep document understanding.
https://ragflow.io
Apache License 2.0
22.64k stars 2.22k forks source link

[Bug]: Python API list chunks #3179

Open syh-24 opened 1 week ago

syh-24 commented 1 week ago

Is there an existing issue for the same bug?

Branch name

main

Commit ID

syhao

Other environment information

ragflow v0.13.0

Actual behavior

Write the python api according to the official documentation to list the chunks of the current documentation

Expected behavior

Lists chunks in the current document.

Steps to reproduce

rag_object = RAGFlow(api_key=api_key, base_url=url)
datasets = rag_object.list_datasets(name="api_test_1")
dataset = datasets[0]
documents = dataset.list_documents()
doc = dataset.list_documents(id="886c38b69a5e11efa3780242ac120006")
doc = doc[0]
chunks = doc.list_chunks()

Additional information

Traceback (most recent call last): File "E:\pycharm\study\RAGFlow-api\api_py_1104.py", line 117, in chunks = doc.list_chunks() ^^^^^^^^^^^^^ File "D:\an\envs\lgraph\Lib\site-packages\ragflow_sdk\modules\document.py", line 63, in list_chunks raise Exception(res.get("message")) Exception: None

Feiue commented 1 week ago

The bug has been fixed and the update is available on GitHub.