AI聊天手记
获取聊天列表: /difyAiNotes GET
Token: authorization
请求参数
参数名 | 示列值 | 类型 | 必须 | 说明 | 默认值 |
---|---|---|---|---|---|
page | 1 | number | 否 | 当前页数 | 1 |
pageSize | 10 | number | 否 | 每页条数 | 10 |
organizationId | 1 | number | 否 | 机构 id | |
memberId | 1 | number | 否 | 患者id | |
isSuicideIntent | 1 | number | 否 | 是否有自杀意向 | |
sort | -createdAt | string | 否 | 排序。多个排序字段用,号隔开。sort=-a,b | |
expand | string | 否 | 获取指定子资源数据: "member,organization" | ||
attributes | ["id", "content"] | array | 否 | 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段 |
- 返回结果
参数名 | 示列值 | 说明 |
---|---|---|
page | 1 | 当前页数 |
pageSize | 10 | 每页条数 |
limit | 10 | 同 pageSize |
offset | 2 | 起始条数 |
total | 3231 | 符合条件的总数量 |
items | [{}] | 返回数据项(聊天手记信息) |
- items:聊天手记
参数名 | 示列值 | 说明 |
---|---|---|
id | 1 | 记录 id |
organizationId | 1 | 机构 id |
memberId | 1 | 患者 id |
conversationId | 1 | 会话 id |
subject | '' | 聊天主题 |
summary | '' | 聊天总结 |
isSuicideIntent | 1 | 是否是自杀意向 |
dateTime | 1653448129 | 疗愈时间(时间戳,单位: 秒) |
chatDuration | 60 | 疗愈时长(单位: 秒) |
chatMessages | [{'messageId': xxx, 'query': '学习', 'answer': '学习压力', 'isSuicideIntent': 1}] | 聊天内容数组 |
createdAt | 1653448129 | 创建时间 |
updatedAt | 1653448129 | 更新时间 |
字段名称 | 示例 | 类型 | 说明 |
---|---|---|---|
messageId | '5ae08ff8-ac2f-492b-90de-e0ec7091b0d9' | string | 聊天内容 id |
query | "学习" | string | 用户提问内容 |
answer | "学习压力" | string | 用户自定义标签-标签名称 |
isSuicideIntent | 1 | number | 是否是自杀意向 |
返回示列
HTTP/1.1 200 OK
{
"items": [
{
"id": 1,
"organizationId": 1,
"memberId": 1,
"conversationId": 1,
"subject": "想学习",
"summary": "红红火火恍恍惚惚",
"isSuicideIntent": 1,
"dateTime": 1653448129,
"chatDuration": 60,
"chatMessages": [
{
"messageId": "xxx",
"query": "学习",
"answer": "学习压力",
"isSuicideIntent": 0
}
],
}
],
"total": 4070,
"offset": 1,
"limit": 2,
"page": 1,
"pageSize": 2
}
所有聊天手记列表: /listAll/difyAiNotes GET
请求参数
参数名 | 示列值 | 类型 | 必须 | 说明 | 默认值 |
---|---|---|---|---|---|
organizationId | 1 | number | 否 | 机构 id | |
memberId | 1 | number | 否 | 患者id | |
isSuicideIntent | 1 | number | 否 | 是否有自杀意向 | |
sort | -createdAt | string | 否 | 排序。多个排序字段用,号隔开。sort=-a,b | |
expand | 'questions' | string | 否 | 获取指定子资源数据: 'member,organization' | |
attributes | ["id", "name"] | array | 否 | 本资源的字段。不定义该字段时返回所有字段;空数组不返回字段 |
返回示列
HTTP/1.1 200 OK
[
{
"id": 1,
"name": "问诊卡1"
}
]
获取聊天手记详情: /difyAiNotes/:id GET
Token: authorization
请求参数
参数名 | 示列值 | 类型 | 必须 | 说明 |
---|---|---|---|---|
id | 1 | number | 是 | 资源id |
expand | 1 | string | 否 | 扩展 |
- 返回结果:聊天手记信息
返回示列
HTTP/1.1 200 OK
{
"id": 1,
...
}
创建聊天手记: /difyAiNotes POST
Token: authorization
请求参数
参数名 | 示列值 | 类型 | 必须 | 说明 |
---|---|---|---|---|
dateTime | 1653448129 | number | 是 | 疗愈时间(时间戳,单位: 秒) |
chatDuration | 60 | number | 是 | 疗愈时长(单位: 秒) |
organizationId | 1 | number | 是 | 机构 id |
conversationId | 1 | number | 是 | 会话 id |
subject | xxx | string | 是 | 聊天主题 |
summary | xxx | string | 是 | 聊天总结 |
isSuicideIntent | 1 | number | 是否是自杀意向 | |
chatMessages | [{'messageId': xxx, 'query': '学习', 'answer': '学习压力', 'isSuicideIntent': 1}] | array | 是 | 聊天内容数组 |
- 返回结果:聊天手记信息