mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 23:01:09 +03:00
fix: add 'document' as the default table name following the langchain/vectorstores/typeorm documentation
This commit is contained in:
@@ -61,7 +61,7 @@ class Postgres_Existing_VectorStores implements INode {
|
|||||||
label: 'Table Name',
|
label: 'Table Name',
|
||||||
name: 'tableName',
|
name: 'tableName',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
placeholder: 'embeddings',
|
placeholder: 'documents',
|
||||||
additionalParams: true,
|
additionalParams: true,
|
||||||
optional: true
|
optional: true
|
||||||
},
|
},
|
||||||
@@ -93,7 +93,8 @@ class Postgres_Existing_VectorStores implements INode {
|
|||||||
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
||||||
const user = getCredentialParam('user', credentialData, nodeData)
|
const user = getCredentialParam('user', credentialData, nodeData)
|
||||||
const password = getCredentialParam('password', credentialData, nodeData)
|
const password = getCredentialParam('password', credentialData, nodeData)
|
||||||
const tableName = nodeData.inputs?.tableName as string
|
const _tableName = nodeData.inputs?.tableName as string
|
||||||
|
const tableName = _tableName ? _tableName : 'documents'
|
||||||
const embeddings = nodeData.inputs?.embeddings as Embeddings
|
const embeddings = nodeData.inputs?.embeddings as Embeddings
|
||||||
const output = nodeData.outputs?.output as string
|
const output = nodeData.outputs?.output as string
|
||||||
const topK = nodeData.inputs?.topK as string
|
const topK = nodeData.inputs?.topK as string
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ class PostgresUpsert_VectorStores implements INode {
|
|||||||
label: 'Table Name',
|
label: 'Table Name',
|
||||||
name: 'tableName',
|
name: 'tableName',
|
||||||
type: 'string',
|
type: 'string',
|
||||||
placeholder: 'embeddings',
|
placeholder: 'documents',
|
||||||
additionalParams: true,
|
additionalParams: true,
|
||||||
optional: true
|
optional: true
|
||||||
},
|
},
|
||||||
@@ -125,7 +125,8 @@ class PostgresUpsert_VectorStores implements INode {
|
|||||||
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
|
||||||
const user = getCredentialParam('user', credentialData, nodeData)
|
const user = getCredentialParam('user', credentialData, nodeData)
|
||||||
const password = getCredentialParam('password', credentialData, nodeData)
|
const password = getCredentialParam('password', credentialData, nodeData)
|
||||||
const tableName = nodeData.inputs?.tableName as string
|
const _tableName = nodeData.inputs?.tableName as string
|
||||||
|
const tableName = _tableName ? _tableName : 'documents'
|
||||||
const docs = nodeData.inputs?.document as Document[]
|
const docs = nodeData.inputs?.document as Document[]
|
||||||
const embeddings = nodeData.inputs?.embeddings as Embeddings
|
const embeddings = nodeData.inputs?.embeddings as Embeddings
|
||||||
const output = nodeData.outputs?.output as string
|
const output = nodeData.outputs?.output as string
|
||||||
|
|||||||
Reference in New Issue
Block a user