mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-24 14:17:47 -06:00
feat: Open AI assistants implemented
This commit is contained in:
@@ -69,6 +69,7 @@ import {
|
||||
ConfigSessionPhone,
|
||||
Database,
|
||||
Log,
|
||||
Openai,
|
||||
ProviderSession,
|
||||
QrCode,
|
||||
S3,
|
||||
@@ -1164,6 +1165,17 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
}
|
||||
}
|
||||
|
||||
if (this.configService.get<Openai>('OPENAI').ENABLED) {
|
||||
if (type === 'notify') {
|
||||
if (messageRaw.messageType !== 'reactionMessage')
|
||||
await this.openaiService.sendOpenai(
|
||||
{ instanceName: this.instance.name, instanceId: this.instanceId },
|
||||
messageRaw.key.remoteJid,
|
||||
messageRaw,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
const contact = await this.prismaRepository.contact.findFirst({
|
||||
where: { remoteJid: received.key.remoteJid, instanceId: this.instanceId },
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user