enviemronts

This commit is contained in:
juanmaldini7 committed 2026-09-28 12:16:40 -03:00
1 parent 8b26bca72d
commit 04f5d6ec75
3 files changed
+5 -6

No files matched your search

+1 -1
View File
@@ -3,7 +3,7 @@ import type { AudioTrack } from './recorder.js';
import { buildPrompt } from './prompt.js';
const ai = new GoogleGenAI({ apiKey: process.env.GEMINI_API_KEY });
const MODEL = process.env.GEMINI_MODEL || 'gemini-3.8-flash';
export const MODEL = process.env.GEMINI_MODEL!;
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
+3 -3
View File
@@ -9,9 +9,9 @@ import {
} from 'discord.js';
import { VoiceConnectionStatus, entersState } from '@discordjs/voice';
import { Recording } from './recorder.js';
import { generateNotes } from './gemini.js';
import { MODEL, generateNotes } from './gemini.js';
for (const key of ['DISCORD_TOKEN', 'GEMINI_API_KEY']) {
for (const key of ['DISCORD_TOKEN', 'GEMINI_API_KEY', 'GEMINI_MODEL']) {
if (!process.env[key]) throw new Error(`Falta la variable de entorno ${key}`);
}
@@ -62,7 +62,7 @@ async function autoFinish(guildId: string, reason: string) {
client.once(Events.ClientReady, async (c) => {
await c.application.commands.set(commands.map((cmd) => cmd.toJSON()));
console.log(`ready as ${c.user.tag}`);
console.log(`ready as ${c.user.tag} | modelo: ${MODEL}`);
});
client.on(Events.InteractionCreate, async (interaction) => {