Fix the bug in create_dataset function (#4284)
### 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>
This commit is contained in:
parent
3ba2b8d80f
commit
54908ebd30
@ -28,7 +28,7 @@ RAGFlow.create_dataset(
|
||||
name: str,
|
||||
avatar: str = "",
|
||||
description: str = "",
|
||||
embedding_model: str = "BAAI/bge-zh-v1.5",
|
||||
embedding_model: str = "BAAI/bge-large-zh-v1.5",
|
||||
language: str = "English",
|
||||
permission: str = "me",
|
||||
chunk_method: str = "naive",
|
||||
|
||||
@ -46,13 +46,15 @@ class RAGFlow:
|
||||
res = requests.put(url=self.api_url + path, json= json,headers=self.authorization_header)
|
||||
return res
|
||||
|
||||
def create_dataset(self, name: str, avatar: str = "", description: str = "", language: str = "English",
|
||||
def create_dataset(self, name: str, avatar: str = "", description: str = "", embedding_model:str = "BAAI/bge-large-zh-v1.5",
|
||||
language: str = "English",
|
||||
permission: str = "me",chunk_method: str = "naive",
|
||||
parser_config: DataSet.ParserConfig = None) -> DataSet:
|
||||
if parser_config:
|
||||
parser_config = parser_config.to_json()
|
||||
res = self.post("/datasets",
|
||||
{"name": name, "avatar": avatar, "description": description, "language": language,
|
||||
{"name": name, "avatar": avatar, "description": description,"embedding_model":embedding_model,
|
||||
"language": language,
|
||||
"permission": permission, "chunk_method": chunk_method,
|
||||
"parser_config": parser_config
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user