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

Endpoint to delete documents ingested #1163

Merged
merged 3 commits into from
Nov 6, 2023

Conversation

lopagela
Copy link
Contributor

@lopagela lopagela commented Nov 4, 2023

A file that is ingested will be transformed into several documents (that are organized into nodes).
This endpoint is deleting documents (bits of a file). These bits can be retrieved thanks to the endpoint to list all the documents.

Also added logs in the scope of this PR

A file that is ingested will be transformed into several documents (that
are organized into nodes).
This endpoint is deleting documents (bits of a file). These bits can be
retrieved thanks to the endpoint to list all the documents.
private_gpt/server/ingest/ingest_service.py Outdated Show resolved Hide resolved
private_gpt/server/ingest/ingest_router.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@imartinez imartinez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last minor changes. Thanks!

private_gpt/server/ingest/ingest_service.py Outdated Show resolved Hide resolved
private_gpt/__main__.py Outdated Show resolved Hide resolved
private_gpt/server/ingest/ingest_router.py Outdated Show resolved Hide resolved
* Adapted log to log file_name instead of the data itself
* Undo changes in __main__.py
* Change API documentation to make it more generic
@imartinez imartinez merged commit 0c40cfb into zylon-ai:main Nov 6, 2023
6 checks passed
@lopagela lopagela deleted the delete-endpoint branch November 6, 2023 14:52
@BennisonDevadoss
Copy link

While uploading a single document, I won't get only one doc_id, ingest post method would return multiple doc_id based on the document size, In this case, should we call the delete API multiple times to delete the uploaded file?

@lopagela
Copy link
Contributor Author

lopagela commented Nov 7, 2023

While uploading a single document, I won't get only one doc_id, ingest post method would return multiple doc_id based on the document size, In this case, should we call the delete API multiple times to delete the uploaded file?

Yes, the client can for loop on the IDs that are returned by the list endpoint

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

Successfully merging this pull request may close these issues.

3 participants