mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

Modify URL assignment based on data type - Fix adding qna_pair when "where" fails check due to wrong source

Open reixd opened this issue 2 years ago • 2 comments

Description

Refactored the code that decides how URL is assigned to handle the special case when the data type is included in the SpecialDataType enumeration. Ensuring appropriate handling of such special data types allows significant flexibility and accuracy when dealing with a variety of data types.

Fixes #611

Type of change

Please delete options that are not relevant.

  • [X] Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Tried to add a qna_pair.

app.add(("Hi", "How are you?"))
app.add(source=("Hi", "How are you?"), data_type="qna_pair")

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] 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] I have checked my code and corrected any misspellings

Maintainer Checklist

  • [X] Made sure Checks passed

reixd avatar Oct 12 '23 13:10 reixd

@reixd thanks a lot for your contribution, I missed your PR. I've updated the new version with a similar fix. Can you please rebase your branch, we can add your extra test. Again, thanks a lot! ❤️

sidmohanty11 avatar Oct 19 '23 08:10 sidmohanty11

@reixd Can you please rebase so that we can quickly review and merge the PR?

deshraj avatar Dec 22 '23 10:12 deshraj

thanks for your contribution @reixd . Will have to close this PR as the code has become stale.

taranjeet avatar Jun 17 '24 00:06 taranjeet