Commit 9f96992
fix: skip empty metadata filter in RetrieverTool to prevent vector store error (#5976)
* fix: skip empty metadata filter in RetrieverTool to prevent vector store error
When a user adds an "Additional Metadata Filter" then removes it, the
empty filter object {} was still passed to the vector store, causing
Pinecone (and potentially others) to reject it with "You must enter a
filter object with at least one key-value pair." Now checks that the
resolved filter has at least one key before assigning it.
Fixes #4900
Signed-off-by: majiayu000 <1835304752@qq.com>
* fix: rename metadatafilter to metadataFilter for camelCase consistency
Signed-off-by: majiayu000 <1835304752@qq.com>
* Delete packages/components/nodes/tools/RetrieverTool/RetrieverTool.test.ts
---------
Signed-off-by: majiayu000 <1835304752@qq.com>
Co-authored-by: Henry Heng <henryheng@flowiseai.com>1 parent cc2a87e commit 9f96992
1 file changed
Lines changed: 6 additions & 4 deletions
Lines changed: 6 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
200 | | - | |
| 200 | + | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | | - | |
205 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
206 | 208 | | |
207 | 209 | | |
208 | 210 | | |
| |||
0 commit comments