chore: Update timezone America/Bogota
This commit is contained in:
@@ -1,5 +1,7 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from zoneinfo import ZoneInfo
|
||||||
|
|
||||||
|
|
||||||
from fastmcp import Client
|
from fastmcp import Client
|
||||||
from langchain.tools import tool
|
from langchain.tools import tool
|
||||||
@@ -8,6 +10,7 @@ from ..logger import logger
|
|||||||
from .schemes import ScheduleSchema
|
from .schemes import ScheduleSchema
|
||||||
|
|
||||||
|
|
||||||
|
TIMEZONE = "America/Bogota"
|
||||||
MCP_SERVER_URL = "http://localhost:8000/mcp"
|
MCP_SERVER_URL = "http://localhost:8000/mcp"
|
||||||
_MCP_CLIENT = Client(MCP_SERVER_URL)
|
_MCP_CLIENT = Client(MCP_SERVER_URL)
|
||||||
|
|
||||||
@@ -25,12 +28,15 @@ class NaliiaTools:
|
|||||||
]
|
]
|
||||||
|
|
||||||
@tool
|
@tool
|
||||||
def get_current_datetime() -> datetime:
|
def get_current_datetime() -> str:
|
||||||
"""
|
"""
|
||||||
Consulta la fecha actual, no se aceptan fechas
|
Consulta la fecha y hora actual del sistema.
|
||||||
en el pasado con respecto a esta fecha.
|
Retorna la fecha en formato ISO 8601.
|
||||||
|
No se aceptan fechas en el pasado con respecto a esta fecha.
|
||||||
"""
|
"""
|
||||||
return datetime.now()
|
logger.info("Consultando fecha actual.")
|
||||||
|
|
||||||
|
return datetime.now(tz=ZoneInfo(TIMEZONE)).isoformat()
|
||||||
|
|
||||||
@tool(args_schema=ScheduleSchema)
|
@tool(args_schema=ScheduleSchema)
|
||||||
def schedule_appointment(
|
def schedule_appointment(
|
||||||
@@ -41,7 +47,7 @@ class NaliiaTools:
|
|||||||
"""
|
"""
|
||||||
Permite al Cliente al Agendar una Cita
|
Permite al Cliente al Agendar una Cita
|
||||||
"""
|
"""
|
||||||
logger.info("Llamando a agendar cita.")
|
logger.info("Agendando cita.")
|
||||||
logger.info([
|
logger.info([
|
||||||
schedule_date,
|
schedule_date,
|
||||||
schedule_time,
|
schedule_time,
|
||||||
|
|||||||
Reference in New Issue
Block a user