Skip to content

Commit

Permalink
Merge pull request #9 from Hostcomm/update-2024-05-15
Browse files Browse the repository at this point in the history
Update 2024 05 15
  • Loading branch information
birksy89 authored May 16, 2024
2 parents 10874e6 + ad15328 commit 50d35f1
Show file tree
Hide file tree
Showing 189 changed files with 11,452 additions and 962 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/autoSyncMergedPullRequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Show PR info
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo The PR #${{ github.event.pull_request.number }} was merged on main branch!
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.AUTOSYNC_TOKEN }}
repository: ${{ secrets.AUTOSYNC_CH_URL }}
Expand All @@ -28,6 +28,6 @@ jobs:
"ref": "${{ github.ref }}",
"prNumber": "${{ github.event.pull_request.number }}",
"prTitle": "${{ github.event.pull_request.title }}",
"prDescription": "${{ toJSON(github.event.pull_request.description) }}",
"prDescription": "",
"sha": "${{ github.sha }}"
}
43 changes: 43 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Docker Image CI

on:
workflow_dispatch:
inputs:
node_version:
description: 'Node.js version to build this image with.'
type: choice
required: true
default: '20'
options:
- '20'
tag_version:
description: 'Tag version of the image to be pushed.'
type: string
required: true
default: 'latest'

jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Set up QEMU
uses: docker/setup-qemu-action@v3.0.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.0.0
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5.3.0
with:
context: .
file: ./docker/Dockerfile
build-args: |
NODE_VERSION=${{github.event.inputs.node_version}}
platforms: linux/amd64,linux/arm64
push: true
tags: flowiseai/flowise:${{github.event.inputs.tag_version}}
57 changes: 57 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,60 @@

## compressed
**/*.tgz

## vscode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Local History for Visual Studio Code
.history/

## other keys
*.key
*.keys
*.priv
*.rsa
*.key.json

## ssh keys
*.ssh
*.ssh-key
.key-mrc

## Certificate Authority
*.ca

## Certificate
*.crt

## Certificate Sign Request
*.csr

## Certificate
*.der

## Key database file
*.kdb

## OSCP request data
*.org

## PKCS #12
*.p12

## PEM-encoded certificate data
*.pem

## Random number seed
*.rnd

## SSLeay data
*.ssleay

## S/MIME message
*.smime
*.vsix
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Flowise has 3 different modules in a single mono repository.

#### Prerequisite

- Install [PNPM](https://pnpm.io/installation)
- Install [PNPM](https://pnpm.io/installation). The project is configured to use pnpm v9.
```bash
npm i -g pnpm
```
Expand Down
4 changes: 2 additions & 2 deletions docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ LOG_PATH=/root/.flowise/logs
BLOB_STORAGE_PATH=/root/.flowise/storage

# NUMBER_OF_PROXIES= 1
# CORS_ORIGINS="*"
# IFRAME_ORIGINS="*"
# CORS_ORIGINS=*
# IFRAME_ORIGINS=*

# DATABASE_TYPE=postgres
# DATABASE_PORT=5432
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ RUN npm install -g flowise

WORKDIR /data

CMD "flowise"
CMD "flowise"
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": "1.6.6",
"version": "1.7.2",
"private": true,
"homepage": "https://flowiseai.com",
"workspaces": [
Expand Down
39 changes: 39 additions & 0 deletions packages/components/credentials/CouchbaseApi.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Temporary disabled due to the incompatibility with the docker node-alpine:
* https://github.com/FlowiseAI/Flowise/pull/2303
import { INodeParams, INodeCredential } from '../src/Interface'
class CouchbaseApi implements INodeCredential {
label: string
name: string
version: number
description: string
inputs: INodeParams[]
constructor() {
this.label = 'Couchbase API'
this.name = 'couchbaseApi'
this.version = 1.0
this.inputs = [
{
label: 'Couchbase Connection String',
name: 'connectionString',
type: 'string'
},
{
label: 'Couchbase Username',
name: 'username',
type: 'string'
},
{
label: 'Couchbase Password',
name: 'password',
type: 'password'
}
]
}
}
module.exports = { credClass: CouchbaseApi }
*/
23 changes: 23 additions & 0 deletions packages/components/credentials/TogetherAIApi.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { INodeParams, INodeCredential } from '../src/Interface'

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

constructor() {
this.label = 'TogetherAI API'
this.name = 'togetherAIApi'
this.version = 1.0
this.inputs = [
{
label: 'TogetherAI Api Key',
name: 'togetherAIApiKey',
type: 'password'
}
]
}
}

module.exports = { credClass: TogetherAIApi }
29 changes: 29 additions & 0 deletions packages/components/credentials/UpstashVectorApi.credential.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { INodeParams, INodeCredential } from '../src/Interface'

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

constructor() {
this.label = 'Upstash Vector API'
this.name = 'upstashVectorApi'
this.version = 1.0
this.inputs = [
{
label: 'Upstash Vector REST URL',
name: 'UPSTASH_VECTOR_REST_URL',
type: 'string'
},
{
label: 'Upstash Vector REST Token',
name: 'UPSTASH_VECTOR_REST_TOKEN',
type: 'password'
}
]
}
}

module.exports = { credClass: UpstashVectorApi }
35 changes: 34 additions & 1 deletion packages/components/models.json
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@
{
"name": "chatGoogleGenerativeAI",
"models": [
{
"label": "gemini-1.5-flash-latest",
"name": "gemini-1.5-flash-latest"
},
{
"label": "gemini-1.5-pro-latest",
"name": "gemini-1.5-pro-latest"
Expand All @@ -335,9 +339,13 @@
{
"name": "chatGoogleVertexAI",
"models": [
{
"label": "gemini-1.5-flash",
"name": "gemini-1.5-flash-preview-0514"
},
{
"label": "gemini-1.5-pro",
"name": "gemini-1.5-pro"
"name": "gemini-1.5-pro-preview-0409"
},
{
"label": "gemini-1.0-pro",
Expand Down Expand Up @@ -365,6 +373,27 @@
}
]
},
{
"name": "groqChat",
"models": [
{
"label": "gemma-7b-it",
"name": "gemma-7b-it"
},
{
"label": "llama3-70b-8192",
"name": "llama3-70b-8192"
},
{
"label": "llama3-8b-8192",
"name": "llama3-8b-8192"
},
{
"label": "mixtral-8x7b-32768",
"name": "mixtral-8x7b-32768"
}
]
},
{
"name": "chatCohere",
"models": [
Expand All @@ -381,6 +410,10 @@
{
"name": "chatOpenAI",
"models": [
{
"label": "gpt-4o",
"name": "gpt-4o"
},
{
"label": "gpt-4",
"name": "gpt-4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { zodToJsonSchema } from 'zod-to-json-schema'
import { AnalyticHandler } from '../../../src/handler'
import { Moderation, checkInputs, streamResponse } from '../../moderation/Moderation'
import { formatResponse } from '../../outputparsers/OutputParserHelpers'
import { addFileToStorage } from '../../../src/storageUtils'
import { addSingleFileToStorage } from '../../../src/storageUtils'

const lenticularBracketRegex = /【[^】]*】/g
const imageRegex = /<img[^>]*\/>/g
Expand Down Expand Up @@ -731,7 +731,7 @@ const downloadImg = async (openai: OpenAI, fileId: string, fileName: string, ...
const image_data_buffer = Buffer.from(image_data)
const mime = 'image/png'

await addFileToStorage(mime, image_data_buffer, fileName, ...paths)
await addSingleFileToStorage(mime, image_data_buffer, fileName, ...paths)

return image_data_buffer
}
Expand All @@ -754,7 +754,7 @@ const downloadFile = async (openAIApiKey: string, fileObj: any, fileName: string
const data_buffer = Buffer.from(data)
const mime = 'application/octet-stream'

return await addFileToStorage(mime, data_buffer, fileName, ...paths)
return await addSingleFileToStorage(mime, data_buffer, fileName, ...paths)
} catch (error) {
console.error('Error downloading or writing the file:', error)
return ''
Expand Down
Loading

0 comments on commit 50d35f1

Please sign in to comment.