mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-24 06:07:45 -06:00
This commit refactors the OpenAIController and OpenAIService to improve credential handling and error management. Key changes include: - Added checks to prevent duplicate API keys and names during bot creation. - Updated the getModels method to accept an optional credential ID for more flexible credential usage. - Enhanced error handling with specific BadRequestException messages for better clarity. - Removed unused methods and streamlined the speech-to-text functionality to utilize instance-specific settings. These improvements enhance the maintainability and usability of the OpenAI integration.