查询会话条目¶
查询本地会话中的一条条目摘要。
GET https://token.moi.matrixorigin.cn/v1/conversations/{conversation_id}/items/{item_id}
调用前准备¶
认证方式见 Genesis 凭据规则。
请求参数¶
将示例中的 $CONVERSATION_ID、$ITEM_ID、$GENESIS_ACCESS_TOKEN 替换为实际值。
curl -X GET "https://token.moi.matrixorigin.cn/v1/conversations/$CONVERSATION_ID/items/$ITEM_ID" \
-H "Authorization: Bearer $GENESIS_ACCESS_TOKEN"
参数 |
类型 |
是否必填 |
说明 |
|---|---|---|---|
|
string |
是 |
条目所属的会话标识。 |
|
string |
是 |
目标条目的 |
成功响应¶
{
"id": "$ITEM_ID",
"object": "conversation.item",
"conversation_id": "$CONVERSATION_ID",
"type": "message",
"role": "user",
"status": "active",
"created_at": 1780000000
}
字段 |
类型 |
说明 |
|---|---|---|
|
string |
条目标识。 |
|
string |
固定为 |
|
string |
条目所属的会话标识。 |
|
string |
条目类型,例如 |
|
string |
条目角色,例如 |
|
string |
条目状态,省略时为 |
|
integer |
创建时间,Unix 秒级时间戳。 |
错误响应¶
资源不存在、已删除或当前凭据不可访问时,请求返回 404。
{
"error": {
"message": "conversation item not found",
"type": "conversation_item_not_found",
"code": "conversation_item_not_found"
}
}
字段 |
类型 |
说明 |
|---|---|---|
|
object |
错误信息。 |
|
string |
错误原因。 |
|
string |
错误类别。 |
|
string |
错误代码。 |
最后更新于