mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-24 14:17:47 -06:00
refactor: update Flowise integration for improved configuration and validation
This commit refines the Flowise integration by enhancing configuration management and validation logic. Key changes include: - Reordered parameters in the FlowiseService constructor for consistency. - Updated FlowiseController to utilize the configService for integration enablement checks. - Simplified FlowiseDto and FlowiseSettingDto by removing unused properties. - Enhanced validation logic in flowise.schema.ts to include new fields. - Improved error handling in the createBot method to prevent duplicate entries. These updates contribute to a more robust and maintainable Flowise integration.
This commit is contained in:
@@ -270,6 +270,7 @@ export type Openai = { ENABLED: boolean; API_KEY_GLOBAL?: string };
|
||||
export type Dify = { ENABLED: boolean };
|
||||
export type N8n = { ENABLED: boolean };
|
||||
export type Evoai = { ENABLED: boolean };
|
||||
export type Flowise = { ENABLED: boolean };
|
||||
|
||||
export type S3 = {
|
||||
ACCESS_KEY: string;
|
||||
@@ -311,6 +312,7 @@ export interface Env {
|
||||
DIFY: Dify;
|
||||
N8N: N8n;
|
||||
EVOAI: Evoai;
|
||||
FLOWISE: Flowise;
|
||||
CACHE: CacheConf;
|
||||
S3?: S3;
|
||||
AUTHENTICATION: Auth;
|
||||
@@ -626,6 +628,9 @@ export class ConfigService {
|
||||
EVOAI: {
|
||||
ENABLED: process.env?.EVOAI_ENABLED === 'true',
|
||||
},
|
||||
FLOWISE: {
|
||||
ENABLED: process.env?.FLOWISE_ENABLED === 'true',
|
||||
},
|
||||
CACHE: {
|
||||
REDIS: {
|
||||
ENABLED: process.env?.CACHE_REDIS_ENABLED === 'true',
|
||||
|
||||
Reference in New Issue
Block a user