Skip to content

Commit

Permalink
Merge branch 'feature/postgres-vector-store-add-pgvector-driver-optio…
Browse files Browse the repository at this point in the history
…n' into fixee-main
  • Loading branch information
JJK801 committed Oct 26, 2024
2 parents 3f1359f + 4e1f4c4 commit 8b60a01
Show file tree
Hide file tree
Showing 48 changed files with 1,526 additions and 307 deletions.
14 changes: 13 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,19 @@ Flowise support different environment variables to configure your instance. You
| S3_ENDPOINT_URL | Custom Endpoint for S3 | String | |
| S3_FORCE_PATH_STYLE | Set this to true to force the request to use path-style addressing | Boolean | false |
| SHOW_COMMUNITY_NODES | Show nodes created by community | Boolean | |

| POSTGRES_VECTORSTORE_HOST | Default `host` for Postgres Vector Store | String | |
| POSTGRES_VECTORSTORE_PORT | Default `port` for Postgres Vector Store | Number | 5432 |
| POSTGRES_VECTORSTORE_USER | Default `user` for Postgres Vector Store | String | |
| POSTGRES_VECTORSTORE_PASSWORD | Default `password` for Postgres Vector Store | String | |
| POSTGRES_VECTORSTORE_DATABASE | Default `database` for Postgres Vector Store | String | |
| POSTGRES_VECTORSTORE_TABLE_NAME | Default `tableName` for Postgres Vector Store | String | documents |
| POSTGRES_VECTORSTORE_CONTENT_COLUMN_NAME | Default `contentColumnName` for Postgres Vector Store | String | pageContent |
| 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 |
You can also specify the env variables when using `npx`. For example:

```
Expand Down
36 changes: 35 additions & 1 deletion docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,38 @@ BLOB_STORAGE_PATH=/root/.flowise/storage
# S3_FORCE_PATH_STYLE=false

# APIKEY_STORAGE_TYPE=json (json | db)
# SHOW_COMMUNITY_NODES=true
# SHOW_COMMUNITY_NODES=true

############################################
# Default postgres vectorstore credentials #
############################################

# POSTGRES_VECTORSTORE_USER=
# POSTGRES_VECTORSTORE_PASSWORD=

#######################################
# Default postgres vectorstore config #
#######################################

# POSTGRES_VECTORSTORE_HOST=
# POSTGRES_VECTORSTORE_DATABASE=
# POSTGRES_VECTORSTORE_PORT=
# POSTGRES_VECTORSTORE_TABLE_NAME=
# POSTGRES_VECTORSTORE_CONTENT_COLUMN_NAME=

###############################################
# Default postgres record manager credentials #
###############################################

# POSTGRES_RECORDMANAGER_USER=
# POSTGRES_RECORDMANAGER_PASSWORD=

##########################################
# Default postgres record manager config #
##########################################

# POSTGRES_RECORDMANAGER_HOST=
# POSTGRES_RECORDMANAGER_DATABASE=
# POSTGRES_RECORDMANAGER_PORT=
# POSTGRES_RECORDMANAGER_TABLE_NAME=
# POSTGRES_RECORDMANAGER_CONTENT_COLUMN_NAME=
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "flowise",
"version": "2.1.2",
"version": "2.1.3",
"private": true,
"homepage": "https://flowiseai.com",
"workspaces": [
Expand Down
75 changes: 74 additions & 1 deletion packages/api-documentation/src/yml/swagger.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
tags:
- name: assistants
- name: attachments
- name: chatmessage
- name: chatflows
- name: document-store
Expand Down Expand Up @@ -270,6 +271,61 @@ paths:
'500':
description: Internal error

/attachments/{chatflowId}/{chatId}:
post:
tags:
- attachments
security:
- bearerAuth: []
operationId: createAttachment
summary: Create attachments array
description: Return contents of the files in plain string format
parameters:
- in: path
name: chatflowId
required: true
schema:
type: string
description: Chatflow ID
- in: path
name: chatId
required: true
schema:
type: string
description: Chat ID
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
files:
type: array
items:
type: string
format: binary
description: Files to be uploaded
required:
- files
required: true
responses:
'200':
description: Attachments created successfully
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/CreateAttachmentResponse'
'400':
description: Invalid input provided
'404':
description: Chatflow or ChatId not found
'422':
description: Validation error
'500':
description: Internal server error

/chatflows:
post:
tags:
Expand Down Expand Up @@ -1825,7 +1881,8 @@ components:
properties:
type:
type: string
description: The type of file upload (e.g., 'file', 'audio', 'url')
enum: [audio, url, file, file:rag, file:full]
description: The type of file upload
example: file
name:
type: string
Expand Down Expand Up @@ -2193,6 +2250,22 @@ components:
format: date-time
description: Date and time when the feedback was created

CreateAttachmentResponse:
type: object
properties:
name:
type: string
description: Name of the file
mimeType:
type: string
description: Mime type of the file
size:
type: string
description: Size of the file
content:
type: string
description: Content of the file in string format

securitySchemes:
bearerAuth:
type: http
Expand Down
25 changes: 25 additions & 0 deletions packages/components/credentials/CerebrasApi.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { INodeParams, INodeCredential } from '../src/Interface'

class CerebrasAPIAuth implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]

constructor() {
this.label = 'Cerebras API Key'
this.name = 'cerebrasAIApi'
this.version = 1.0
this.inputs = [
{
label: 'Cerebras API Key',
name: 'cerebrasApiKey',
type: 'password',
description: 'API Key (cloud.cerebras.ai)'
}
]
}
}

module.exports = { credClass: CerebrasAPIAuth }
69 changes: 52 additions & 17 deletions packages/components/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,29 @@
"name": "awsChatBedrock",
"models": [
{
"label": "anthropic.claude-3-haiku",
"name": "anthropic.claude-3-haiku-20240307-v1:0",
"description": "Image to text, conversation, chat optimized"
"label": "anthropic.claude-3.5-sonnet-20241022-v2:0",
"name": "anthropic.claude-3-5-sonnet-20241022-v2:0",
"description": "(20241022-v2:0) specific version of Claude Sonnet 3.5 - most intelligent model"
},
{
"label": "anthropic.claude-3.5-sonnet",
"label": "anthropic.claude-3.5-sonnet-20240620-v1:0",
"name": "anthropic.claude-3-5-sonnet-20240620-v1:0",
"description": "3.5 version of Claude Sonnet model"
"description": "(20240620-v1:0) specific version of Claude Sonnet 3.5 - most intelligent model"
},
{
"label": "anthropic.claude-3-opus",
"name": "anthropic.claude-3-opus-20240229-v1:0",
"description": "Powerful model for highly complex tasks, reasoning and analysis"
},
{
"label": "anthropic.claude-3-sonnet",
"name": "anthropic.claude-3-sonnet-20240229-v1:0",
"description": "Image to text and code, multilingual conversation, complex reasoning and analysis"
"description": "Balance of intelligence and speed"
},
{
"label": "anthropic.claude-3-opus",
"name": "anthropic.claude-3-opus-20240229-v1:0",
"description": "Image to text and code, multilingual conversation, complex reasoning and analysis"
"label": "anthropic.claude-3-haiku",
"name": "anthropic.claude-3-haiku-20240307-v1:0",
"description": "Fastest and most compact model for near-instant responsiveness"
},
{
"label": "anthropic.claude-instant-v1",
Expand Down Expand Up @@ -295,25 +300,35 @@
"name": "chatAnthropic",
"models": [
{
"label": "claude-3-haiku",
"name": "claude-3-haiku-20240307",
"description": "Fastest and most compact model, designed for near-instant responsiveness"
"label": "claude-3.5-sonnet-latest",
"name": "claude-3-5-sonnet-latest",
"description": "Most recent snapshot version of Claude Sonnet 3.5 model - most intelligent model"
},
{
"label": "claude-3-opus",
"name": "claude-3-opus-20240229",
"description": "Most powerful model for highly complex tasks"
"label": "claude-3.5-sonnet-20241022",
"name": "claude-3-5-sonnet-20241022",
"description": "(20241022) specific version of Claude Sonnet 3.5 - most intelligent model"
},
{
"label": "claude-3.5-sonnet",
"label": "claude-3.5-sonnet-20240620",
"name": "claude-3-5-sonnet-20240620",
"description": "3.5 version of Claude Sonnet model"
"description": "(20240620) specific version of Claude Sonnet 3.5 - most intelligent model"
},
{
"label": "claude-3-opus",
"name": "claude-3-opus-20240229",
"description": "Powerful model for highly complex tasks, reasoning and analysis"
},
{
"label": "claude-3-sonnet",
"name": "claude-3-sonnet-20240229",
"description": "Ideal balance of intelligence and speed for enterprise workloads"
},
{
"label": "claude-3-haiku",
"name": "claude-3-haiku-20240307",
"description": "Fastest and most compact model, designed for near-instant responsiveness"
},
{
"label": "claude-2.0 (legacy)",
"name": "claude-2.0",
Expand Down Expand Up @@ -439,6 +454,26 @@
"label": "gemini-1.0-pro-vision",
"name": "gemini-1.0-pro-vision"
},
{
"label": "claude-3-5-sonnet-v2@20241022",
"name": "claude-3-5-sonnet-v2@20241022",
"description": "(20241022-v2:0) specific version of Claude Sonnet 3.5 - most intelligent model"
},
{
"label": "claude-3-opus@20240229",
"name": "claude-3-opus@20240229",
"description": "Powerful model for highly complex tasks, reasoning and analysis"
},
{
"label": "claude-3-sonnet@20240229",
"name": "claude-3-sonnet@20240229",
"description": "Balance of intelligence and speed"
},
{
"label": "claude-3-haiku@20240307",
"name": "claude-3-haiku@20240307",
"description": "Fastest and most compact model for near-instant responsiveness"
},
{
"label": "chat-bison",
"name": "chat-bison"
Expand Down
Loading

0 comments on commit 8b60a01

Please sign in to comment.