Skip to content

Conversation

@pmukeshreddy
Copy link

Summary

Users were passing top_k expecting it to limit results, but the correct parameter is limit. This adds top_k as an alias for better developer experience.

Changes

  • Added top_k parameter to Memory.search()
  • Added top_k parameter to AsyncMemory.search()
  • When top_k is provided, it overrides limit

Related Issue

Fixes #3819

Users were passing top_k expecting it to limit results, but the
correct parameter is 'limit'. This adds top_k as an alias for
better developer experience.
Fixes mem0ai#3819
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can the search method limit the number of memory entries returned

1 participant