mirror of
https://github.com/marcogll/talia_bot.git
synced 2026-01-13 13:25:19 +00:00
This commit delivers the complete and final implementation of the new conversational flow engine, addressing all feedback from previous code reviews. - **Adds Critical Data Files:** Creates `talia_bot/data/flows.json` and `talia_bot/data/services.json`, resolving the critical blocking issue and making the bot fully functional. - **Corrects Vikunja Flow:** The `admin_project_management` flow in `flows.json` now correctly includes a step to select a task after selecting a project. The resolution logic in `main.py` is updated to use the correct `task_id`. - **Implements All Resolutions:** The `handle_flow_resolution` function in `main.py` is now complete, with functional logic for all resolution types, including robust date/time parsing for calendar events and branching logic for idea capture. - **Fixes and Cleanup:** Corrects the OpenAI API call in the `transcription.py` module and removes all legacy `ConversationHandler` code from `vikunja.py` and `main.py`. - **Configuration and Docs:** The project configuration (`config.py`, `.env.example`) and documentation (`README.md`) are fully updated to reflect the final state of the new architecture.
59 lines
1.8 KiB
Plaintext
59 lines
1.8 KiB
Plaintext
# .env.example
|
|
# Rellena estas variables y renombra este archivo a .env
|
|
|
|
# --- TELEGRAM & SECURITY ---
|
|
# Token de tu bot de Telegram, obtenido de @BotFather.
|
|
TELEGRAM_BOT_TOKEN=
|
|
# Tu Telegram User ID. Usado para notificaciones críticas y funciones de administrador.
|
|
ADMIN_ID=
|
|
# (Opcional) Lista separada por comas de IDs de Telegram para los miembros del equipo.
|
|
CREW_CHAT_IDS=
|
|
|
|
# --- AI CORE ---
|
|
# Tu clave de API de OpenAI.
|
|
OPENAI_API_KEY=
|
|
# El modelo de OpenAI que quieres usar (ej. gpt-4, gpt-3.5-turbo).
|
|
OPENAI_MODEL=gpt-3.5-turbo
|
|
|
|
# --- INTEGRACIONES ---
|
|
# URL base de tu instancia de Vikunja (ej. https://vikunja.tu-dominio.com/api/v1).
|
|
VIKUNJA_BASE_URL=
|
|
# Token de API generado en Vikunja.
|
|
VIKUNJA_TOKEN=
|
|
# ID del proyecto en Vikunja que se usará como "bandeja de entrada" para nuevas tareas.
|
|
VIKUNJA_INBOX_PROJECT_ID=
|
|
|
|
# Ruta al archivo JSON de credenciales de tu cuenta de servicio de Google.
|
|
GOOGLE_SERVICE_ACCOUNT_FILE=google_key.json
|
|
# ID del calendario de Google que el bot gestionará.
|
|
CALENDAR_ID=
|
|
|
|
# --- PRINT SERVICE (SMTP/IMAP) ---
|
|
# Servidor SMTP para enviar correos.
|
|
SMTP_SERVER=
|
|
# Puerto del servidor SMTP (ej. 465 para SSL, 587 para STARTTLS).
|
|
SMTP_PORT=
|
|
# Usuario para la autenticación SMTP.
|
|
SMTP_USER=
|
|
# Contraseña para la autenticación SMTP.
|
|
SMTP_PASSWORD=
|
|
|
|
# Servidor IMAP para leer correos.
|
|
IMAP_SERVER=
|
|
# Usuario para la autenticación IMAP.
|
|
IMAP_USER=
|
|
# Contraseña para la autenticación IMAP.
|
|
IMAP_PASSWORD=
|
|
# Dirección de correo de la impresora (a donde se envían los trabajos de impresión).
|
|
PRINTER_EMAIL=
|
|
|
|
# --- OTROS ---
|
|
# (Opcional) URL de un webhook de n8n para integraciones personalizadas.
|
|
N8N_WEBHOOK_URL=
|
|
# Hora para enviar el resumen diario (formato HH:MM).
|
|
DAILY_SUMMARY_TIME=08:00
|
|
# Tu enlace de Calendly para agendar citas.
|
|
CALENDLY_LINK=
|
|
# Zona horaria para el bot (ej. America/Mexico_City, Europe/Madrid).
|
|
TIMEZONE=America/Monterrey
|