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

How to delete content in user_paste #1565

Closed
abuyusif01 opened this issue Apr 17, 2024 · 2 comments
Closed

How to delete content in user_paste #1565

abuyusif01 opened this issue Apr 17, 2024 · 2 comments
Labels

Comments

@abuyusif01
Copy link

I have a very specific usecase where i stream data via pipelines and paste it to h2ogpt using api_name='/add_text'

My question here is, how can i delete the pasted resources i longer need.

@pseudotensor
Copy link
Collaborator

You can delete any document via delete_sources api. You need to know it's name, which one can get as part of the output of add_text.

I have one unit test of this endpoint:

sources_text_after_delete = client.predict(source_list[0], langchain_mode3, h2ogpt_key, api_name='/delete_sources')
source_list_assert = [x.replace('v1', '').replace('v7', '') for x in source_list] # for arxiv for asserts
assert source_list_assert[0] not in sources_text_after_delete

Does this help?

@pseudotensor pseudotensor added the type/question Question label Apr 18, 2024
@abuyusif01
Copy link
Author

Yeah it does, closing issue.

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

2 participants