mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 19:00:59 +03:00
feat: Add SSL configuration option for Postgres connections (#4130)
Update README files for Postgres Record Manager and Vector Store to include a new SSL environment variable, allowing optional SSL configuration for database connections
This commit is contained in:
@@ -2,7 +2,7 @@ import { VectorStore } from '@langchain/core/vectorstores'
|
||||
import { getCredentialData, getCredentialParam, ICommonObject, INodeData } from '../../../../src'
|
||||
import { Document } from '@langchain/core/documents'
|
||||
import { Embeddings } from '@langchain/core/embeddings'
|
||||
import { getDatabase, getHost, getPort, getTableName } from '../utils'
|
||||
import { getDatabase, getHost, getPort, getSSL, getTableName } from '../utils'
|
||||
|
||||
export abstract class VectorStoreDriver {
|
||||
constructor(protected nodeData: INodeData, protected options: ICommonObject) {}
|
||||
@@ -23,6 +23,10 @@ export abstract class VectorStoreDriver {
|
||||
return getPort(this.nodeData) as number
|
||||
}
|
||||
|
||||
getSSL() {
|
||||
return getSSL(this.nodeData) as boolean
|
||||
}
|
||||
|
||||
getDatabase() {
|
||||
return getDatabase(this.nodeData) as string
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@ export class TypeORMDriver extends VectorStoreDriver {
|
||||
type: 'postgres',
|
||||
host: this.getHost(),
|
||||
port: this.getPort(),
|
||||
ssl: this.getSSL(),
|
||||
username: user, // Required by TypeORMVectorStore
|
||||
user: user, // Required by Pool in similaritySearchVectorWithScore
|
||||
password: password,
|
||||
|
||||
Reference in New Issue
Block a user