-
Notifications
You must be signed in to change notification settings - Fork 433
Closed
Labels
Description
SQLBot version
Please describe your requirements or suggestions for improvement
尊敬的SQLBot 团队:
对于一些时间日期的计算
例如:
SELECT "首课日期" AS "first_class_date",
"流失日期" AS "churn_date",
("流失日期" - "首课日期") AS "duration"
FROM "public"."REPORT0_e250913af2"
WHERE "首课日期" IS NOT NULL
AND "流失日期" IS NOT NULL
ORDER BY "duration"
LIMIT 1000
报错
Traceback (most recent call last):
File "/opt/sqlbot/app/apps/chat/task/llm.py", line 1050, in run_task
self.save_sql_data(data_obj=result)
TypeError: Type is not JSON serializable: datetime.timedelta
这一类问题会出现报错,似乎是JSON 序列话的问题,类似的问题是可以通过提示词 或自定义SQL 解决,除此之外还有其他的办法嘛

