evolution-api/src/api/integrations/chatbot/openai/dto/openai.dto.ts
Davidson Gomes 9cedf31eed feat(env): enhance webhook configuration and SSL support
- Added new environment variables for SSL configuration, including `SSL_CONF_PRIVKEY` and `SSL_CONF_FULLCHAIN`, to support secure connections.
- Introduced additional webhook configuration options in the `.env.example` file, such as `WEBHOOK_REQUEST_TIMEOUT_MS`, `WEBHOOK_RETRY_MAX_ATTEMPTS`, and related retry settings to improve webhook resilience and error handling.
- Updated the `bootstrap` function in `main.ts` to handle SSL certificate loading failures gracefully, falling back to HTTP if necessary.
- Enhanced error handling and logging in the `BusinessStartupService` to ensure better traceability and robustness when processing messages.

This commit focuses on improving the security and reliability of webhook interactions while ensuring that the application can handle SSL configurations effectively.
2025-05-21 17:55:00 -03:00

25 lines
564 B
TypeScript

import { BaseChatbotDto, BaseChatbotSettingDto } from '../../base-chatbot.dto';
export class OpenaiCredsDto {
name: string;
apiKey: string;
}
export class OpenaiDto extends BaseChatbotDto {
openaiCredsId: string;
botType: string;
assistantId?: string;
functionUrl?: string;
model?: string;
systemMessages?: string[];
assistantMessages?: string[];
userMessages?: string[];
maxTokens?: number;
}
export class OpenaiSettingDto extends BaseChatbotSettingDto {
openaiCredsId?: string;
openaiIdFallback?: string;
speechToText?: boolean;
}