liuhua
liuhua
commited on
Commit
·
fe9e315
1
Parent(s):
150c0c3
Fix the bug in create_dataset function (#4284)
Browse files### What problem does this PR solve?
Fix the bug in create_dataset function #4136
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
---------
Co-authored-by: liuhua <10215101452@stu.ecun.edu.cn>
docs/references/python_api_reference.md
CHANGED
@@ -28,7 +28,7 @@ RAGFlow.create_dataset(
|
|
28 |
name: str,
|
29 |
avatar: str = "",
|
30 |
description: str = "",
|
31 |
-
embedding_model: str = "BAAI/bge-zh-v1.5",
|
32 |
language: str = "English",
|
33 |
permission: str = "me",
|
34 |
chunk_method: str = "naive",
|
|
|
28 |
name: str,
|
29 |
avatar: str = "",
|
30 |
description: str = "",
|
31 |
+
embedding_model: str = "BAAI/bge-large-zh-v1.5",
|
32 |
language: str = "English",
|
33 |
permission: str = "me",
|
34 |
chunk_method: str = "naive",
|
sdk/python/ragflow_sdk/ragflow.py
CHANGED
@@ -46,13 +46,15 @@ class RAGFlow:
|
|
46 |
res = requests.put(url=self.api_url + path, json= json,headers=self.authorization_header)
|
47 |
return res
|
48 |
|
49 |
-
def create_dataset(self, name: str, avatar: str = "", description: str = "",
|
|
|
50 |
permission: str = "me",chunk_method: str = "naive",
|
51 |
parser_config: DataSet.ParserConfig = None) -> DataSet:
|
52 |
if parser_config:
|
53 |
parser_config = parser_config.to_json()
|
54 |
res = self.post("/datasets",
|
55 |
-
{"name": name, "avatar": avatar, "description": description,
|
|
|
56 |
"permission": permission, "chunk_method": chunk_method,
|
57 |
"parser_config": parser_config
|
58 |
}
|
|
|
46 |
res = requests.put(url=self.api_url + path, json= json,headers=self.authorization_header)
|
47 |
return res
|
48 |
|
49 |
+
def create_dataset(self, name: str, avatar: str = "", description: str = "", embedding_model:str = "BAAI/bge-large-zh-v1.5",
|
50 |
+
language: str = "English",
|
51 |
permission: str = "me",chunk_method: str = "naive",
|
52 |
parser_config: DataSet.ParserConfig = None) -> DataSet:
|
53 |
if parser_config:
|
54 |
parser_config = parser_config.to_json()
|
55 |
res = self.post("/datasets",
|
56 |
+
{"name": name, "avatar": avatar, "description": description,"embedding_model":embedding_model,
|
57 |
+
"language": language,
|
58 |
"permission": permission, "chunk_method": chunk_method,
|
59 |
"parser_config": parser_config
|
60 |
}
|