Spaces:
Sleeping
Sleeping
dai.venire
commited on
Commit
·
60ad1c1
1
Parent(s):
b24aee4
add log check time ambious
Browse files- app/api/v1/time.py +1 -0
- app/services/time_service.py +1 -1
app/api/v1/time.py
CHANGED
|
@@ -26,6 +26,7 @@ async def check_time_ambiguity(
|
|
| 26 |
params = body.get_parameters()
|
| 27 |
data = TimeRequest(**params)
|
| 28 |
if not data.time_select:
|
|
|
|
| 29 |
logger.error("Time is empty")
|
| 30 |
raise HTTPException(status_code=400, detail="Time is required")
|
| 31 |
|
|
|
|
| 26 |
params = body.get_parameters()
|
| 27 |
data = TimeRequest(**params)
|
| 28 |
if not data.time_select:
|
| 29 |
+
logger.info(f"[check_time_ambiguity] Received data: {data}")
|
| 30 |
logger.error("Time is empty")
|
| 31 |
raise HTTPException(status_code=400, detail="Time is required")
|
| 32 |
|
app/services/time_service.py
CHANGED
|
@@ -17,7 +17,7 @@ class TimeService:
|
|
| 17 |
bool: True nếu thời gian là mơ hồ, False nếu rõ ràng.
|
| 18 |
"""
|
| 19 |
if not time:
|
| 20 |
-
logger.error("Time is empty")
|
| 21 |
raise ValueError("Time is required")
|
| 22 |
|
| 23 |
time = extra_time_dialogflow(time)
|
|
|
|
| 17 |
bool: True nếu thời gian là mơ hồ, False nếu rõ ràng.
|
| 18 |
"""
|
| 19 |
if not time:
|
| 20 |
+
logger.error("[TimeService][check_time_ambiguity] Time is empty")
|
| 21 |
raise ValueError("Time is required")
|
| 22 |
|
| 23 |
time = extra_time_dialogflow(time)
|