This PR introduce a Replacement member to the vectorstores options. This option can be used in AddDocuments function.
When Replacement is set to true, AddDocuments function will delete old record with the same Metadata attribute. (i.e to replace).
When Replacement is set to false (default case) , AddDocuments
function will simply add documents without checking existing
document records.
[x] Name your Pull Request title clearly, concisely, and prefixed with the name of the primarily affected package you changed according to Good commit messages (such as memory: add interfaces for X, Y or util: add whizzbang helpers).
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. Fixes #123).
[x] Describes the source of new concepts.
[x] References existing implementations as appropriate.
vectorstores: add
Replacement
optionThis PR introduce a
Replacement
member to the vectorstores options. This option can be used inAddDocuments
function. When Replacement is set totrue
, AddDocuments function will delete old record with the same Metadata attribute. (i.e to replace). When Replacement is set tofalse
(default case) , AddDocuments function will simply add documents without checking existing document records.PR Checklist
memory: add interfaces for X, Y
orutil: add whizzbang helpers
).Fixes #123
).golangci-lint
checks.