Skip to content

Commit 6885c38

Browse files
authored
Chore/Accept Dynamic Variable From Metadata Filter (#5203)
* add acceptVariable property to vector store metadata filter * add accepVariadd acceptVariable property to other json fields
1 parent 6e2f2df commit 6885c38

File tree

19 files changed

+38
-19
lines changed

19 files changed

+38
-19
lines changed

packages/components/nodes/tools/AgentAsTool/AgentAsTool.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ class AgentAsTool_Tools implements INode {
6969
description: 'Override the config passed to the Agentflow.',
7070
type: 'json',
7171
optional: true,
72-
additionalParams: true
72+
additionalParams: true,
73+
acceptVariable: true
7374
},
7475
{
7576
label: 'Base URL',

packages/components/nodes/tools/ChatflowTool/ChatflowTool.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ class ChatflowTool_Tools implements INode {
6969
description: 'Override the config passed to the Chatflow.',
7070
type: 'json',
7171
optional: true,
72-
additionalParams: true
72+
additionalParams: true,
73+
acceptVariable: true
7374
},
7475
{
7576
label: 'Base URL',

packages/components/nodes/tools/OpenAPIToolkit/OpenAPIToolkit.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ class OpenAPIToolkit_Tools implements INode {
4646
type: 'json',
4747
description: 'Request headers to be sent with the API request. For example, {"Authorization": "Bearer token"}',
4848
additionalParams: true,
49-
optional: true
49+
optional: true,
50+
acceptVariable: true
5051
},
5152
{
5253
label: 'Remove null parameters',

packages/components/nodes/tools/RetrieverTool/RetrieverTool.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ class Retriever_Tools implements INode {
173173
hint: {
174174
label: 'What can you filter?',
175175
value: howToUse
176-
}
176+
},
177+
acceptVariable: true
177178
}
178179
]
179180
}

packages/components/nodes/vectorstores/Chroma/Chroma.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class Chroma_VectorStores implements INode {
7474
name: 'chromaMetadataFilter',
7575
type: 'json',
7676
optional: true,
77-
additionalParams: true
77+
additionalParams: true,
78+
acceptVariable: true
7879
},
7980
{
8081
label: 'Top K',

packages/components/nodes/vectorstores/Couchbase/Couchbase.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ class Couchbase_VectorStores implements INode {
9696
name: 'couchbaseMetadataFilter',
9797
type: 'json',
9898
optional: true,
99-
additionalParams: true
99+
additionalParams: true,
100+
acceptVariable: true
100101
},
101102
{
102103
label: 'Top K',

packages/components/nodes/vectorstores/Kendra/Kendra.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ class Kendra_VectorStores implements INode {
8686
description: 'Optional filter to apply when retrieving documents',
8787
type: 'json',
8888
optional: true,
89-
additionalParams: true
89+
additionalParams: true,
90+
acceptVariable: true
9091
}
9192
]
9293
// Note: Kendra doesn't support MMR search, but keeping the structure consistent

packages/components/nodes/vectorstores/Meilisearch/Meilisearch.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ class MeilisearchRetriever_node implements INode {
8989
type: 'string',
9090
description: 'search filter to apply on searchable attributes',
9191
additionalParams: true,
92-
optional: true
92+
optional: true,
93+
acceptVariable: true
9394
}
9495
]
9596
this.outputs = [

packages/components/nodes/vectorstores/Milvus/Milvus.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ class Milvus_VectorStores implements INode {
100100
description:
101101
'Filter data with a simple string query. Refer Milvus <a target="_blank" href="https://milvus.io/blog/2022-08-08-How-to-use-string-data-to-empower-your-similarity-search-applications.md#Hybrid-search">docs</a> for more details.',
102102
placeholder: 'doc=="a"',
103-
additionalParams: true
103+
additionalParams: true,
104+
acceptVariable: true
104105
},
105106
{
106107
label: 'Top K',

packages/components/nodes/vectorstores/MongoDBAtlas/MongoDBAtlas.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,8 @@ class MongoDBAtlas_VectorStores implements INode {
9090
name: 'mongoMetadataFilter',
9191
type: 'json',
9292
optional: true,
93-
additionalParams: true
93+
additionalParams: true,
94+
acceptVariable: true
9495
},
9596
{
9697
label: 'Top K',

0 commit comments

Comments
 (0)