fix: add 'document' as the default table name following the langchain/vectorstores/typeorm documentation

This commit is contained in:
fabiovalencio 2023-08-17 15:56:18 +01:00
parent 80e1e9176e
commit be147a6e4d
2 changed files with 6 additions and 4 deletions

View File

@ -61,7 +61,7 @@ class Postgres_Existing_VectorStores implements INode {
label: 'Table Name',
name: 'tableName',
type: 'string',
placeholder: 'embeddings',
placeholder: 'documents',
additionalParams: true,
optional: true
},
@ -93,7 +93,8 @@ class Postgres_Existing_VectorStores implements INode {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const user = getCredentialParam('user', 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 output = nodeData.outputs?.output as string
const topK = nodeData.inputs?.topK as string

View File

@ -70,7 +70,7 @@ class PostgresUpsert_VectorStores implements INode {
label: 'Table Name',
name: 'tableName',
type: 'string',
placeholder: 'embeddings',
placeholder: 'documents',
additionalParams: true,
optional: true
},
@ -125,7 +125,8 @@ class PostgresUpsert_VectorStores implements INode {
const credentialData = await getCredentialData(nodeData.credential ?? '', options)
const user = getCredentialParam('user', 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 embeddings = nodeData.inputs?.embeddings as Embeddings
const output = nodeData.outputs?.output as string