### 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>
42 lines
759 B
Markdown
42 lines
759 B
Markdown
# python-ragflow
|
|
|
|
# update python client
|
|
|
|
- Update "version" field of [project] chapter
|
|
- build new python SDK
|
|
- upload to pypi.org
|
|
- install new python SDK
|
|
|
|
# build python SDK
|
|
|
|
```shell
|
|
rm -f dist/* && python setup.py sdist bdist_wheel
|
|
```
|
|
|
|
# install python SDK
|
|
```shell
|
|
pip uninstall -y ragflow && pip install dist/*.whl
|
|
```
|
|
|
|
This will install ragflow-sdk and its dependencies.
|
|
|
|
# upload to pypi.org
|
|
```shell
|
|
twine upload dist/*.whl
|
|
```
|
|
|
|
Enter your pypi API token according to the prompt.
|
|
|
|
Note that pypi allow a version of a package [be uploaded only once](https://pypi.org/help/#file-name-reuse). You need to change the `version` inside the `pyproject.toml` before build and upload.
|
|
|
|
# using
|
|
|
|
```python
|
|
|
|
```
|
|
|
|
# For developer
|
|
```shell
|
|
pip install -e .
|
|
```
|