-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Prostgres Vector Store] Add PGVector Driver option + Fix null charac…
…ter issue w/ TypeORM Driver (#3367) * Add PGVector Driver option + Fix null character issue w/ TypeORM Driver * Handle file upload case with PGVector * Cleanup * Fix data filtering for chatflow uploaded files * Add distanceStrategy parameter * Fix query to improve chatflow uploaded files filtering * Ensure PGVector release connections * Await client connected * Make Postgres credentials optionnal when set on env variables * Document env variables in nodes directories * Prevent reuse client * Fix empty metadataFilter * Update CONTRIBUTING.md * Update Postgres.ts --------- Co-authored-by: Henry Heng <[email protected]>
- Loading branch information
1 parent
39380a4
commit 15d59a9
Showing
10 changed files
with
535 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
packages/components/nodes/recordmanager/PostgresRecordManager/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Postgres Record Manager | ||
|
||
Postgres Record Manager integration for Flowise | ||
|
||
## 🌱 Env Variables | ||
|
||
| Variable | Description | Type | Default | | ||
| ---------------------------- | ----------------------------------------------------------------------------------------------- | ------------------------------------------------ | ----------------------------------- | | ||
| POSTGRES_RECORDMANAGER_HOST | Default `host` for Postgres Record Manager | String | | | ||
| POSTGRES_RECORDMANAGER_PORT | Default `port` for Postgres Record Manager | Number | 5432 | | ||
| POSTGRES_RECORDMANAGER_USER | Default `user` for Postgres Record Manager | String | | | ||
| POSTGRES_RECORDMANAGER_PASSWORD | Default `password` for Postgres Record Manager | String | | | ||
| POSTGRES_RECORDMANAGER_DATABASE | Default `database` for Postgres Record Manager | String | | | ||
| POSTGRES_RECORDMANAGER_TABLE_NAME | Default `tableName` for Postgres Record Manager | String | upsertion_records | | ||
|
||
## License | ||
|
||
Source code in this repository is made available under the [Apache License Version 2.0](https://github.com/FlowiseAI/Flowise/blob/master/LICENSE.md). |
17 changes: 17 additions & 0 deletions
17
packages/components/nodes/recordmanager/PostgresRecordManager/utils.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { defaultChain, INodeData } from '../../../src' | ||
|
||
export function getHost(nodeData?: INodeData) { | ||
return defaultChain(nodeData?.inputs?.host, process.env.POSTGRES_RECORDMANAGER_HOST) | ||
} | ||
|
||
export function getDatabase(nodeData?: INodeData) { | ||
return defaultChain(nodeData?.inputs?.database, process.env.POSTGRES_RECORDMANAGER_DATABASE) | ||
} | ||
|
||
export function getPort(nodeData?: INodeData) { | ||
return defaultChain(nodeData?.inputs?.port, process.env.POSTGRES_RECORDMANAGER_PORT, '5432') | ||
} | ||
|
||
export function getTableName(nodeData?: INodeData) { | ||
return defaultChain(nodeData?.inputs?.tableName, process.env.POSTGRES_RECORDMANAGER_TABLE_NAME, 'upsertion_records') | ||
} |
Oops, something went wrong.