Skip to content

Commit

Permalink
Fix the bug in create_dataset function (#4284)
Browse files Browse the repository at this point in the history
### 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 <[email protected]>
  • Loading branch information
Feiue and liuhua authored Dec 30, 2024
1 parent 3ba2b8d commit 54908eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/references/python_api_reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 4 additions & 2 deletions sdk/python/ragflow_sdk/ragflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ def put(self, path, json):
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
}
Expand Down

0 comments on commit 54908eb

Please sign in to comment.