跳到主要内容

时间解析

请求参数

名称类型示例描述
Urlstringhttp://api.aicisl.org.cn/chat/time-parse访问地址
bodyjson输入的文本
contentlist输入的文本列表

请求示例

curl --location 'http://api.aicisl.org.cn/chat/time-parse' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: ••••••' \
--data '{
"content":["7月15日","今年上半年","两年","每年"]
}'

返回参数

名称类型描述
resultlist返回结果
definitionstring准确度 (精确或模糊)
timeobject时间信息
typestring时间类型

返回示例

{
"result": [
{
"definition": "accurate",
"time": [
"2024-07-15 00:00:00",
"2024-07-15 23:59:59"
],
"type": "time_point"
},
{
"definition": "blur",
"time": [
"2024-01-01 00:00:00",
"2024-06-30 23:59:59"
],
"type": "time_span"
},
{
"definition": "accurate",
"time": {
"year": 2.0
},
"type": "time_delta"
},
{
"definition": "accurate",
"time": {
"delta": {
"year": 1
},
"point": null
},
"type": "time_period"
}
]
}