mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

[Feature] add `app.delete()` method

Open deven298 opened this issue 2 years ago • 1 comments

Description

This PR enables deleting sources from the db.

from embedchain import App

app = App()

source_id = app.add("https://www.forbes.com/profile/elon-musk")

app.delete(source_id=source_id)

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Refactor (does not change functionality, e.g. code style improvements, linting)
  • [x] Documentation update

How Has This Been Tested?

  • [ ] Unit Test
  • [x] Test Script

Checklist:

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [x] Any dependent changes have been merged and published in downstream modules
  • [x] I have checked my code and corrected any misspellings

Maintainer Checklist

  • [x] closes #1175
  • [x] Made sure Checks passed

deven298 avatar Jan 18 '24 05:01 deven298

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (7444f59) 55.56% compared to head (51a7de4) 57.10%. Report is 3 commits behind head on main.

Files Patch % Lines
embedchain/embedchain.py 20.00% 4 Missing :warning:
embedchain/vectordb/base.py 50.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1187      +/-   ##
==========================================
+ Coverage   55.56%   57.10%   +1.54%     
==========================================
  Files         143      143              
  Lines        5712     5719       +7     
==========================================
+ Hits         3174     3266      +92     
+ Misses       2538     2453      -85     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jan 18 '24 05:01 codecov[bot]