From 04f5d6ec75ac996a0835e91e1c3142eaf18422e6 Mon Sep 17 00:00:00 2001 From: JuanMaldini Date: Mon, 28 Sep 2026 12:16:40 -0300 Subject: [PATCH] enviemronts --- .env.example | 3 +-- src/gemini.ts | 2 +- src/index.ts | 6 +++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.env.example b/.env.example index dcfd040..8fd846c 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,3 @@ DISCORD_TOKEN= GEMINI_API_KEY= -# Opcional -GEMINI_MODEL=gemini-3.8-flash +GEMINI_MODEL= diff --git a/src/gemini.ts b/src/gemini.ts index f62f026..c0c3d79 100644 --- a/src/gemini.ts +++ b/src/gemini.ts @@ -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)); diff --git a/src/index.ts b/src/index.ts index baf4d83..604627f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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) => {