mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 12:22:21 -06:00
refactor: integrations folder
This commit is contained in:
@@ -90,4 +90,20 @@ export class OpenaiController {
|
||||
|
||||
return this.openaiService.ignoreJid(instance, data);
|
||||
}
|
||||
|
||||
public async emit({
|
||||
instance,
|
||||
remoteJid,
|
||||
msg,
|
||||
pushName,
|
||||
}: {
|
||||
instance: InstanceDto;
|
||||
remoteJid: string;
|
||||
msg: any;
|
||||
pushName?: string;
|
||||
}) {
|
||||
if (!configService.get<Openai>('OPENAI').ENABLED) return;
|
||||
|
||||
await this.openaiService.sendOpenai(instance, remoteJid, pushName, msg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,8 @@ import {
|
||||
OpenaiIgnoreJidDto,
|
||||
OpenaiSettingDto,
|
||||
} from '@api/integrations/chatbot/openai/dto/openai.dto';
|
||||
import { openaiController } from '@api/integrations/integration.module';
|
||||
import { HttpStatus } from '@api/routes/index.router';
|
||||
import { openaiController } from '@api/server.module';
|
||||
import {
|
||||
instanceSchema,
|
||||
openaiCredsSchema,
|
||||
|
||||
Reference in New Issue
Block a user