时间解析
请求参数
名称 | 类型 | 示例 | 描述 |
---|---|---|---|
Url | string | http://api.aicisl.org.cn/chat/time-parse | 访问地址 |
body | json | 输入的文本 | |
content | list | 输入的文本列表 |
请求示例
curl --location 'http://api.aicisl.org.cn/chat/time-parse' \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: ••••••' \
--data '{
"content":["7月15日","今年上半年","两年","每年"]
}'
返回参数
名称 | 类型 | 描述 |
---|---|---|
result | list | 返回结果 |
definition | string | 准确度 (精确或模糊) |
time | object | 时间信息 |
type | string | 时间类型 |
返回示例
{
"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"
}
]
}