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

[Bug] Delete link curl command is not working #724

Closed
2 of 6 tasks
arun-gupta opened this issue Sep 3, 2024 · 7 comments
Closed
2 of 6 tasks

[Bug] Delete link curl command is not working #724

arun-gupta opened this issue Sep 3, 2024 · 7 comments
Assignees
Labels

Comments

@arun-gupta
Copy link
Contributor

Priority

Undecided

OS type

Other (Please let us know in description)

Hardware type

Xeon-SPR

Installation method

  • Pull docker images from hub.docker.com
  • Build docker images from source

Deploy method

  • Docker compose
  • Docker
  • Kubernetes
  • Helm

Running nodes

Single Node

What's the version?

Amazon Linux 2023 AMI
v0.9 of Docker images

Description

Following the instructions to set up OPEA mega-service on AWS. The command to delete a link gives an error:

[ec2-user@ip-172-31-77-194 ~]$ # delete link
curl -X POST "http://${host_ip}:6007/v1/dataprep/delete_file" \
     -d '{"file_path": "https://opea.dev"}' \
     -H "Content-Type: application/json"
{"detail":"File https://opea.dev not found. Please check file_path."}

Reproduce steps

Detailed steps at https://gist.github.com/arun-gupta/7e9f080feff664fbab878b26d13d83d7

Raw log

No response

@yinghu5 yinghu5 added the aitce label Sep 4, 2024
@yinghu5 yinghu5 self-assigned this Sep 4, 2024
@feng-intel
Copy link
Collaborator

What's the OS? There is no delete command in Ubuntu.
Is it $ curl -X DELETE [URL] [options] ?

@yinghu5 yinghu5 assigned feng-intel and unassigned yinghu5 Sep 4, 2024
@arun-gupta
Copy link
Contributor Author

This is on Amazon Linux 2023

Adding a link using link_list as the parameter but the delete command shows file_path. Does that seem correct?

@feng-intel
Copy link
Collaborator

$ docker pull amazonlinux
Using default tag: latest
latest: Pulling from library/amazonlinux
b60b6c892280: Pull complete
Digest: sha256:171fe68a5c4114e48c19513c6341da2c6d693454f62edddaf7ac0ad2f13693d0
Status: Downloaded newer image for amazonlinux:latest
docker.io/library/amazonlinux:latest

$ docker run -it amazonlinux:latest /bin/bash
bash-5.2# delete
bash: delete: command not found


@arun-gupta
Copy link
Contributor Author

Is the POST command above translates to delete command? If so, what would be an O/S-agnostic way?

@feng-intel
Copy link
Collaborator

Sorry. "# delete link" , it's commented. No "delete" command here.

Check here,
"The file_path here should be the id get from /v1/dataprep/get_file API."
Can you get_file ?

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

@arun-gupta
Copy link
Contributor Author

This is not uploading a file though, its providing a hyperlink to update the vector database. How do I clean that up?

@feng-intel
Copy link
Collaborator

Reference here

# delete link
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"file_path": "https://www.ces.tech/.txt"}' \
    http://localhost:6007/v1/dataprep/delete_file

# delete file
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"file_path": "uploaded_file_1.txt"}' \
    http://localhost:6007/v1/dataprep/delete_file

# delete all files and links
curl -X POST \
    -H "Content-Type: application/json" \
    -d '{"file_path": "all"}' \
    http://localhost:6007/v1/dataprep/delete_file

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

No branches or pull requests

3 participants