mem0 icon indicating copy to clipboard operation
mem0 copied to clipboard

[ Fix ]TypeError when using Chat completion

Open parshvadaftari opened this issue 1 year ago • 0 comments

Description

Resolves an issue in the chat.completions class where the relevant memories retrieved from the memory client were not being accessed correctly. The relevant_memories variable, which is expected to contain the relevant memories under the key "results", was not being correctly referenced, leading to a TypeError.

Fixes #1913

Type of change

Please delete options that are not relevant.

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)

How Has This Been Tested?

  • [x] Unit Test
  • [x] Test Script (please provide)

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 #1913
  • [x] Made sure Checks passed

parshvadaftari avatar Sep 27 '24 13:09 parshvadaftari