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

Delete file is fault by http://${host_ip}:6009/v1/dataprep/delete_file" #539

Closed
NeoZhangJianyu opened this issue Aug 7, 2024 · 1 comment
Assignees

Comments

@NeoZhangJianyu
Copy link
Collaborator

I test the ChatQnA example.
After add knowledge base by:

curl -X POST "http://${host_ip}:6007/v1/dataprep" \
     -H "Content-Type: multipart/form-data" \
     -F "files=@./nke-10k-2023.pdf"
or
curl -X POST "http://${host_ip}:6007/v1/dataprep" \
     -H "Content-Type: multipart/form-data" \
     -F 'link_list=["https://opea.dev"]'

I try to delete single file by cmd:

curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
     -d '{"file_path": "https://opea.dev"}' \
     -H "Content-Type: application/json"
or
curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
     -d '{"file_path": "nke-10k-2023.pdf"}' \
     -H "Content-Type: application/json"

The file or link is present when check by:

curl -X POST "http://${host_ip}:6008/v1/dataprep/get_file" \
     -H "Content-Type: application/json"

But when delete all files by:

curl -X POST "http://${host_ip}:6009/v1/dataprep/delete_file" \
     -d '{"file_path": "all"}' \
     -H "Content-Type: application/json"

It works well.

@letonghan
Copy link
Collaborator

Hi @NeoZhangJianyu , your issue is caused by the fail of uploading file. Root cause is the missing of a dataprep parameter.
This issue was already fixed by this PR and the issue will be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants