Skip to content

Commit

Permalink
feat add system instruction id
Browse files Browse the repository at this point in the history
  • Loading branch information
binsarjr committed Aug 16, 2024
1 parent c1b1b9f commit 11e8c6c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libs/whatsapp-action/src/ai/ai-gemini.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
jidNormalizedUser,
proto,
} from '@whiskeysockets/baileys';
import { randomUUID } from 'crypto';
import 'moment/locale/id';
import PQueue from 'p-queue';
import {
Expand Down Expand Up @@ -80,6 +81,7 @@ export class AiGeminiAction extends WhatsappMessageAction {
private readonly queue = new PQueue({ concurrency: 10 });
constructor(private readonly geminiFunctionService: GeminiFunctionService) {
super();
systemInstruction += ' SYSTEM INSTRUCTION ID:' + randomUUID();
this.gemini.setSystemInstruction(injectRandomHiddenText(systemInstruction));
this.gemini.setModel('gemini-1.5-flash-latest');
}
Expand Down

0 comments on commit 11e8c6c

Please sign in to comment.