mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-23 06:30:00 +08:00
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:
parent
93c26ae1ef
commit
cc5f4a5efa
@ -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"})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user