mirror of
https://github.com/marcogll/talia_bot.git
synced 2026-01-13 21:35:19 +00:00
feat: Implement LLM and scheduler functionalities
This commit finalizes Phase 4 of the project by implementing the LLM and scheduler integrations. - Implements `get_smart_response` in `app/llm.py` to generate AI-powered responses using the OpenAI API. - Implements a daily summary scheduler in `app/scheduler.py` using the `JobQueue` from `python-telegram-bot` for better integration with the application's event loop. - Adds `get_events_for_day` to `app/calendar.py` to fetch daily events for the summary. - Integrates the scheduler into the main application loop in `app/main.py`. - Improves the date formatting in the daily summary for better readability. - Updates `tasks.md` to reflect the completion of Phase 4.
This commit is contained in:
@@ -28,6 +28,7 @@ from modules.equipo import (
|
||||
from modules.aprobaciones import view_pending, handle_approval_action
|
||||
from modules.servicios import get_service_info
|
||||
from modules.admin import get_system_status
|
||||
from app.scheduler import setup_scheduler
|
||||
|
||||
# Enable logging
|
||||
logging.basicConfig(
|
||||
@@ -103,6 +104,9 @@ def main() -> None:
|
||||
application.add_handler(CommandHandler("start", start))
|
||||
application.add_handler(CallbackQueryHandler(button_dispatcher))
|
||||
|
||||
# Set up the scheduler
|
||||
setup_scheduler(application)
|
||||
|
||||
logger.info("Starting Talía Bot...")
|
||||
application.run_polling()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user