cambiando dev variables

This commit is contained in:
2025-06-06 11:28:21 -06:00
parent cfbe535747
commit 2880b7dbe9
4 changed files with 18 additions and 3631 deletions

View File

@@ -45,7 +45,7 @@ console.log(`Using Gemini API key: ${API_KEY}`);
const genAI = API_KEY ? new GoogleGenAI({ apiKey: API_KEY }) : null; const genAI = API_KEY ? new GoogleGenAI({ apiKey: API_KEY }) : null;
const MCP_URL = process.env.MCP_URL || 'http://planilla.interno.com/mcp'; const MCP_URL = process.env.MCP_URL || 'http://localhost:5000/mcp';
let mcpClient: Client | undefined; let mcpClient: Client | undefined;
let mcpTransport: StreamableHTTPClientTransport | undefined; let mcpTransport: StreamableHTTPClientTransport | undefined;

File diff suppressed because it is too large Load Diff

View File

@@ -6,7 +6,7 @@ dotenv.config();
export type Handler = string | ((conv: Conversation) => Promise<string>); export type Handler = string | ((conv: Conversation) => Promise<string>);
export const chatHandlers: Record<string, Handler> = { export const chatHandlers: Record<string, Handler> = {
'50498554225@c.us': process.env.CONVERSATION_AGENT_URL || 'http://conversation-layer-agent:8001', '50498554225@c.us': process.env.CONVERSATION_AGENT_URL || 'http://localhost:8001',
// Add other mappings like: // Add other mappings like:
// '50496210031@c.us': 'http://llm-agent:8000' // '50496210031@c.us': 'http://llm-agent:8000'
}; };

View File

@@ -66,7 +66,7 @@ export function registerWebhookRoutes(
// Corrected Gemini API call structure // Corrected Gemini API call structure
const result = await genAI.models.generateContent({ const result = await genAI.models.generateContent({
model: 'gemini-pro', // Ensure this model supports inline audio or use appropriate one model: 'gemini-2.0-flash', // Ensure this model supports inline audio or use appropriate one
contents: [ contents: [
{ inlineData: { mimeType: 'audio/ogg', data: audioBase64 } }, { inlineData: { mimeType: 'audio/ogg', data: audioBase64 } },
{ text: 'Generate a transcript of the speech.' }, { text: 'Generate a transcript of the speech.' },