mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 13:00:56 +03:00
Feature/Add bullmq redis for message queue processing (#3568)
* add bullmq redis for message queue processing * Update pnpm-lock.yaml * update queue manager * remove singleton patterns, add redis to cache pool * add bull board ui * update rate limit handler * update redis configuration * Merge add rate limit redis prefix * update rate limit queue events * update preview loader to queue * refractor namings to constants * update env variable for queue * update worker shutdown gracefully
This commit is contained in:
@@ -1,4 +1,15 @@
|
||||
import { IAction, ICommonObject, IFileUpload, INode, INodeData as INodeDataFromComponent, INodeParams } from 'flowise-components'
|
||||
import {
|
||||
IAction,
|
||||
ICommonObject,
|
||||
IFileUpload,
|
||||
INode,
|
||||
INodeData as INodeDataFromComponent,
|
||||
INodeParams,
|
||||
IServerSideEventStreamer
|
||||
} from 'flowise-components'
|
||||
import { DataSource } from 'typeorm'
|
||||
import { CachePool } from './CachePool'
|
||||
import { Telemetry } from './utils/telemetry'
|
||||
|
||||
export type MessageType = 'apiMessage' | 'userMessage'
|
||||
|
||||
@@ -6,6 +17,11 @@ export type ChatflowType = 'CHATFLOW' | 'MULTIAGENT' | 'ASSISTANT'
|
||||
|
||||
export type AssistantType = 'CUSTOM' | 'OPENAI' | 'AZURE'
|
||||
|
||||
export enum MODE {
|
||||
QUEUE = 'queue',
|
||||
MAIN = 'main'
|
||||
}
|
||||
|
||||
export enum ChatType {
|
||||
INTERNAL = 'INTERNAL',
|
||||
EXTERNAL = 'EXTERNAL'
|
||||
@@ -28,6 +44,7 @@ export interface IChatFlow {
|
||||
isPublic?: boolean
|
||||
apikeyid?: string
|
||||
analytic?: string
|
||||
speechToText?: string
|
||||
chatbotConfig?: string
|
||||
followUpPrompts?: string
|
||||
apiConfig?: string
|
||||
@@ -226,6 +243,7 @@ export interface IncomingInput {
|
||||
leadEmail?: string
|
||||
history?: IMessage[]
|
||||
action?: IAction
|
||||
streaming?: boolean
|
||||
}
|
||||
|
||||
export interface IActiveChatflows {
|
||||
@@ -290,6 +308,34 @@ export interface ICustomTemplate {
|
||||
usecases?: string
|
||||
}
|
||||
|
||||
export interface IFlowConfig {
|
||||
chatflowid: string
|
||||
chatId: string
|
||||
sessionId: string
|
||||
chatHistory: IMessage[]
|
||||
apiMessageId: string
|
||||
overrideConfig?: ICommonObject
|
||||
}
|
||||
|
||||
export interface IPredictionQueueAppServer {
|
||||
appDataSource: DataSource
|
||||
componentNodes: IComponentNodes
|
||||
sseStreamer: IServerSideEventStreamer
|
||||
telemetry: Telemetry
|
||||
cachePool: CachePool
|
||||
}
|
||||
|
||||
export interface IExecuteFlowParams extends IPredictionQueueAppServer {
|
||||
incomingInput: IncomingInput
|
||||
chatflow: IChatFlow
|
||||
chatId: string
|
||||
baseURL: string
|
||||
isInternal: boolean
|
||||
signal?: AbortController
|
||||
files?: Express.Multer.File[]
|
||||
isUpsert?: boolean
|
||||
}
|
||||
|
||||
export interface INodeOverrides {
|
||||
[key: string]: {
|
||||
label: string
|
||||
|
||||
Reference in New Issue
Block a user