Refatoração da funcionalidade de chatbots (em andamento) by gomessguii · Pull Request #1482 · EvolutionAPI/evolution-api · GitHub
Skip to content

Refatoração da funcionalidade de chatbots (em andamento)#1482

Merged
DavidsonGomes merged 2 commits intoEvolutionAPI:developfrom
gomessguii:fix/message-query
May 21, 2025
Merged

Refatoração da funcionalidade de chatbots (em andamento)#1482
DavidsonGomes merged 2 commits intoEvolutionAPI:developfrom
gomessguii:fix/message-query

Conversation

@gomessguii
Copy link
Copy Markdown
Member

@gomessguii gomessguii commented May 21, 2025

Summary by Sourcery

Refactor chatbot integrations to remove duplication and centralize common logic.

Enhancements:

  • Introduce BaseChatbotService and BaseChatbotController to consolidate shared chatbot functionality across all integrations
  • Update Openai/Dify/N8n/Evoai services to extend the base service and simplify session, message, and media handling
  • Refactor Openai/Dify/N8n/Evoai controllers to extend the base controller for unified bot management, settings, and event emission
  • Convert chatbot-specific DTOs to extend shared BaseChatbotDto and BaseChatbotSettingDto to standardize configuration fields

…on 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.
… transcription handling

- Updated OpenaiService and related classes to enhance the initialization process by ensuring the correct order of parameters.
- Simplified audio message handling by consolidating transcription logic and improving error handling.
- Refactored the OpenaiController to utilize the new structure, ensuring better integration with the base chatbot framework.
- Enhanced logging for better traceability during audio processing and API interactions.
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai Bot commented May 21, 2025

@DavidsonGomes DavidsonGomes merged commit 09120aa into EvolutionAPI:develop May 21, 2025
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants