mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 20:02:20 -06:00
feat(chatbot): implement base chatbot structure and enhance integration capabilities
- Introduced a base structure for chatbot integrations, including BaseChatbotController and BaseChatbotService. - Added common DTOs for chatbot settings and data to streamline integration processes. - Updated existing chatbot controllers (Dify, Evoai, N8n) to extend from the new base classes, improving code reusability and maintainability. - Enhanced media message handling across integrations, including audio transcription capabilities using OpenAI's Whisper API. - Refactored service methods to accommodate new message structures and improve error handling.
This commit is contained in:
@@ -1,38 +1,13 @@
|
||||
import { $Enums, TriggerOperator, TriggerType } from '@prisma/client';
|
||||
import { BaseChatbotDto, BaseChatbotSettingDto } from '../../base-chatbot.dto';
|
||||
|
||||
export class DifyDto {
|
||||
enabled?: boolean;
|
||||
description?: string;
|
||||
export class DifyDto extends BaseChatbotDto {
|
||||
// Dify specific fields
|
||||
botType?: $Enums.DifyBotType;
|
||||
apiUrl?: string;
|
||||
apiKey?: string;
|
||||
expire?: number;
|
||||
keywordFinish?: string;
|
||||
delayMessage?: number;
|
||||
unknownMessage?: string;
|
||||
listeningFromMe?: boolean;
|
||||
stopBotFromMe?: boolean;
|
||||
keepOpen?: boolean;
|
||||
debounceTime?: number;
|
||||
triggerType?: TriggerType;
|
||||
triggerOperator?: TriggerOperator;
|
||||
triggerValue?: string;
|
||||
ignoreJids?: any;
|
||||
splitMessages?: boolean;
|
||||
timePerChar?: number;
|
||||
}
|
||||
|
||||
export class DifySettingDto {
|
||||
expire?: number;
|
||||
keywordFinish?: string;
|
||||
delayMessage?: number;
|
||||
unknownMessage?: string;
|
||||
listeningFromMe?: boolean;
|
||||
stopBotFromMe?: boolean;
|
||||
keepOpen?: boolean;
|
||||
debounceTime?: number;
|
||||
difyIdFallback?: string;
|
||||
ignoreJids?: any;
|
||||
splitMessages?: boolean;
|
||||
timePerChar?: number;
|
||||
export class DifySettingDto extends BaseChatbotSettingDto {
|
||||
// Dify specific fields
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user