Skip to content

Commit

Permalink
Add milvusTextField configuration for Milvus
Browse files Browse the repository at this point in the history
  • Loading branch information
mokeyish authored Jan 10, 2024
1 parent 6e2bf91 commit 1dc9690
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion packages/components/nodes/vectorstores/Milvus/Milvus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,14 @@ class Milvus_VectorStores implements INode {
name: 'milvusCollection',
type: 'string'
},
{
label: 'Milvus Text Field',
name: 'milvusTextField',
type: 'string',
placeholder: 'langchain_text',
optional: true,
additionalParams: true
},
{
label: 'Milvus Filter',
name: 'milvusFilter',
Expand Down Expand Up @@ -150,6 +158,7 @@ class Milvus_VectorStores implements INode {
const address = nodeData.inputs?.milvusServerUrl as string
const collectionName = nodeData.inputs?.milvusCollection as string
const milvusFilter = nodeData.inputs?.milvusFilter as string
const textField = nodeData.inputs?.milvusTextField as string

// embeddings
const embeddings = nodeData.inputs?.embeddings as Embeddings
Expand All @@ -169,7 +178,8 @@ class Milvus_VectorStores implements INode {
// init MilvusLibArgs
const milVusArgs: MilvusLibArgs = {
url: address,
collectionName: collectionName
collectionName: collectionName,
textField: textField
}

if (milvusUser) milVusArgs.username = milvusUser
Expand Down

0 comments on commit 1dc9690

Please sign in to comment.