This PR adds a new API endpoint /delete-conversation-history/{key} that allows for the deletion of a conversation history from the Redis database. It also includes the necessary changes in the chat_store/db.py file to implement the deletion functionality.
Summary of Changes
Added a new function db_delete_conversation in chat_store/db.py that deletes a conversation history from the Redis database.
Created a new API endpoint /delete-conversation-history/{key} in api.py that calls the db_delete_conversation function.
The API endpoint is a DELETE request that takes a key parameter representing the conversation key.
The db_delete_conversation function retrieves the Redis instance, deletes the conversation history associated with the key, and returns a success message or an error message if the conversation history does not exist.
Please review and merge this PR. Thank you!
Fixes #4.
To checkout this PR branch, run the following command in your terminal:
git checkout sweep/delete-conversation-history
🎉 Latest improvements to Sweep:
Use Sweep Map to break large issues into smaller sub-issues, perfect for large tasks like "Sweep (map): migrate from React class components to function components"
Getting Sweep to format before committing! Check out Sweep Sandbox Configs to set it up.
We released a demo of our chunker, where you can find the corresponding blog and code.
💡 To get Sweep to edit this pull request, you can:
Leave a comment below to get Sweep to edit the entire PR
Leave a comment in the code will only modify the file
Edit the original issue to get Sweep to recreate the PR from scratch
Description
This PR adds a new API endpoint
/delete-conversation-history/{key}
that allows for the deletion of a conversation history from the Redis database. It also includes the necessary changes in thechat_store/db.py
file to implement the deletion functionality.Summary of Changes
db_delete_conversation
inchat_store/db.py
that deletes a conversation history from the Redis database./delete-conversation-history/{key}
inapi.py
that calls thedb_delete_conversation
function.key
parameter representing the conversation key.db_delete_conversation
function retrieves the Redis instance, deletes the conversation history associated with thekey
, and returns a success message or an error message if the conversation history does not exist.Please review and merge this PR. Thank you!
Fixes #4.
To checkout this PR branch, run the following command in your terminal:
🎉 Latest improvements to Sweep:
💡 To get Sweep to edit this pull request, you can: