Support Direct Import in the open source lib #2107
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Support Direct Import in the open source lib
Add infer parameter to control memory inference behavior
Added a new optional boolean parameter 'infer' to the add() method that allows
controlling whether inference should be used when adding memories. When infer=False,
the method will directly embed and store the raw messages without performing any
inference or deduction, providing a faster and simpler memory storage option.
This gives users more flexibility in how memories are processed and stored.
The default value is True to maintain backward compatibility.
Another change: to make the UT could run locally, I have to fix the test_proxy.py
Type of change
How Has This Been Tested?
Replaced the high-level mocking of _add_to_vector_store with detailed component-level
mocks to provide better test coverage and validation of internal behaviors.
Checklist:
Maintainer Checklist