Fix: python_api_reference.md update dataset bug (#6527)

### What problem does this PR solve?

There is a small bug in the update dataset of this document. The return
type of rag_oobject.list_datasets is a list type, and the first item
should be taken as' ragflow_stdk.modules.dataset ' DataSet`, Adapt to
the update.

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
zstar 2025-03-26 17:30:09 +08:00 committed by GitHub
parent 93c26ae1ef
commit cc5f4a5efa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -330,6 +330,7 @@ from ragflow_sdk import RAGFlow
rag_object = RAGFlow(api_key="<YOUR_API_KEY>", base_url="http://<YOUR_BASE_URL>:9380") rag_object = RAGFlow(api_key="<YOUR_API_KEY>", base_url="http://<YOUR_BASE_URL>:9380")
dataset = rag_object.list_datasets(name="kb_name") dataset = rag_object.list_datasets(name="kb_name")
dataset = dataset[0]
dataset.update({"embedding_model":"BAAI/bge-zh-v1.5", "chunk_method":"manual"}) dataset.update({"embedding_model":"BAAI/bge-zh-v1.5", "chunk_method":"manual"})
``` ```