refactor: enhance Evoai integration with improved validation and message handling

This commit refines the Evoai integration by updating the service and controller logic for better functionality and maintainability. Key changes include:
- Added the `openaiService` as a parameter in the EvoaiService constructor for improved dependency management.
- Enhanced the createBot method in EvoaiController to include EvoAI-specific validation and duplicate checks.
- Updated EvoaiDto and EvoaiSettingDto to remove unnecessary comments and add a fallback property.
- Refined the message processing logic in EvoaiService to handle audio messages more effectively and improve logging clarity.
- Adjusted the schema for Evoai settings to rename `evoaiIdFallback` to `botIdFallback` for better clarity.

These updates contribute to a more robust and maintainable Evoai integration.
This commit is contained in:
Guilherme Gomes
2025-05-27 16:00:32 -03:00
parent 95bd85b6e3
commit 97ca23a7b0
5 changed files with 52 additions and 120 deletions

View File

@@ -71,7 +71,7 @@ export const evoaiSettingSchema: JSONSchema7 = {
keepOpen: { type: 'boolean' },
debounceTime: { type: 'integer' },
ignoreJids: { type: 'array', items: { type: 'string' } },
evoaiIdFallback: { type: 'string' },
botIdFallback: { type: 'string' },
splitMessages: { type: 'boolean' },
timePerChar: { type: 'integer' },
},