Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: create dataset #1106

Merged
merged 2 commits into from
Jun 11, 2024
Merged

API: create dataset #1106

merged 2 commits into from
Jun 11, 2024

Conversation

JinHai-CN
Copy link
Contributor

What problem does this PR solve?

This PR have finished 'create dataset' of both HTTP API and Python SDK.
HTTP API:

curl --request POST --url http://<HOST_ADDRESS>/api/v1/dataset   --header 'Content-Type: application/json' --header 'Authorization: <ACCESS_KEY>' --data-binary '{
  "name": "<DATASET_NAME>"
}'

Python SDK:

from ragflow.ragflow import RAGFLow
ragflow = RAGFLow('<ACCESS_KEY>', 'http://127.0.0.1:9380')
ragflow.create_dataset("dataset1")

TODO:

  • ACCESS_KEY is the login_token when user login RAGFlow, currently. RAGFlow should have the function that user can add/delete access_key.

Type of change

  • New Feature (non-breaking change which adds functionality)
  • Documentation Update

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
@JinHai-CN JinHai-CN requested review from KevinHuSh and cecilia-uu June 9, 2024 13:33
@JinHai-CN JinHai-CN changed the title API: Create dataset API: create dataset Jun 9, 2024
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
@JinHai-CN JinHai-CN merged commit cf2f659 into infiniflow:main Jun 11, 2024
1 check passed
@ghoshsanjoy78
Copy link

Is the documentation updated for this ? I don't see "Create dataset" or "Create knowledgebase" in the API documentation here - https://ragflow.io/docs/dev/api

Halfknow pushed a commit to Halfknow/ragflow that referenced this pull request Nov 11, 2024
### What problem does this PR solve?

This PR have finished 'create dataset' of both HTTP API and Python SDK.
HTTP API:
```
curl --request POST --url http://<HOST_ADDRESS>/api/v1/dataset   --header 'Content-Type: application/json' --header 'Authorization: <ACCESS_KEY>' --data-binary '{
  "name": "<DATASET_NAME>"
}'
```

Python SDK:
```
from ragflow.ragflow import RAGFLow
ragflow = RAGFLow('<ACCESS_KEY>', 'http://127.0.0.1:9380')
ragflow.create_dataset("dataset1")

```

TODO: 
- ACCESS_KEY is the login_token when user login RAGFlow, currently.
RAGFlow should have the function that user can add/delete access_key.

### Type of change

- [x] New Feature (non-breaking change which adds functionality)
- [x] Documentation Update

---------

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants