mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-21 04:42:20 -06:00
feat: Integration with Dify
Adds support for Dify integration, including new routes, services, and controllers. The configuration for Dify has been added to the environment file, and the necessary changes have been made to the `.env.example` file. Additionally, the WhatsApp Baileys service has been updated to handle Dify notifications. Modified files: - `.env.example` - `package.json` - `src/api/integrations/openai/services/openai.service.ts` - `src/api/routes/index.router.ts` - `src/api/server.module.ts` - `src/api/services/channel.service.ts` - `src/api/services/channels/whatsapp.baileys.service.ts` - `src/config/env.config.ts` - `src/validate/validate.schema.ts` Introduced files: - `src/api/integrations/dify/` - `src/api/integrations/dify/controllers/dify.controller.ts` - `src/api/integrations/dify/dto/dify.dto.ts` - `src/api/integrations/dify/routes/dify.router.ts` - `src/api/integrations/dify/services/dify.service.ts` - `src/api/integrations/dify/validate/dify.schema.ts`
This commit is contained in:
@@ -192,6 +192,7 @@ export type Chatwoot = {
|
||||
};
|
||||
};
|
||||
export type Openai = { ENABLED: boolean; API_KEY_GLOBAL?: string };
|
||||
export type Dify = { ENABLED: boolean };
|
||||
|
||||
export type S3 = {
|
||||
ACCESS_KEY: string;
|
||||
@@ -226,6 +227,7 @@ export interface Env {
|
||||
TYPEBOT: Typebot;
|
||||
CHATWOOT: Chatwoot;
|
||||
OPENAI: Openai;
|
||||
DIFY: Dify;
|
||||
CACHE: CacheConf;
|
||||
S3?: S3;
|
||||
AUTHENTICATION: Auth;
|
||||
@@ -437,6 +439,9 @@ export class ConfigService {
|
||||
ENABLED: process.env?.OPENAI_ENABLED === 'true',
|
||||
API_KEY_GLOBAL: process.env?.OPENAI_API_KEY_GLOBAL || null,
|
||||
},
|
||||
DIFY: {
|
||||
ENABLED: process.env?.DIFY_ENABLED === 'true',
|
||||
},
|
||||
CACHE: {
|
||||
REDIS: {
|
||||
ENABLED: process.env?.CACHE_REDIS_ENABLED === 'true',
|
||||
|
||||
Reference in New Issue
Block a user