Skip to content

Commit

Permalink
filter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryHengZJ committed Jan 26, 2024
1 parent 20b2cd2 commit b050920
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/components/nodes/vectorstores/Qdrant/Qdrant.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { flatten } from 'lodash'
import { QdrantClient } from '@qdrant/js-client-rest'
import type { Schemas as QdrantSchemas } from '@qdrant/js-client-rest'
import { VectorStoreRetrieverInput } from 'langchain/vectorstores/base'
import { Document } from 'langchain/document'
import { QdrantVectorStore, QdrantLibArgs } from 'langchain/vectorstores/qdrant'
Expand All @@ -8,6 +9,12 @@ import { ICommonObject, INode, INodeData, INodeOutputsValue, INodeParams } from
import { getBaseClasses, getCredentialData, getCredentialParam } from '../../../src/utils'

type RetrieverConfig = Partial<VectorStoreRetrieverInput<QdrantVectorStore>>
type QdrantSearchResponse = QdrantSchemas['ScoredPoint'] & {

Check warning on line 12 in packages/components/nodes/vectorstores/Qdrant/Qdrant.ts

View workflow job for this annotation

GitHub Actions / build (ubuntu-latest, 18.15.0)

'QdrantSearchResponse' is defined but never used. Allowed unused vars must match /^_/u
payload: {
metadata: object
content: string
}
}

class Qdrant_VectorStores implements INode {
label: string
Expand Down Expand Up @@ -194,7 +201,7 @@ class Qdrant_VectorStores implements INode {
const qdrantVectorDimension = nodeData.inputs?.qdrantVectorDimension
const output = nodeData.outputs?.output as string
const topK = nodeData.inputs?.topK as string
let queryFilter = nodeData.inputs?.queryFilter
let queryFilter = nodeData.inputs?.qdrantFilter

const k = topK ? parseFloat(topK) : 4

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class Qdrant_Existing_VectorStores implements INode {
const qdrantVectorDimension = nodeData.inputs?.qdrantVectorDimension
const output = nodeData.outputs?.output as string
const topK = nodeData.inputs?.topK as string
let queryFilter = nodeData.inputs?.queryFilter
let queryFilter = nodeData.inputs?.qdrantFilter

const k = topK ? parseFloat(topK) : 4

Expand Down

0 comments on commit b050920

Please sign in to comment.