跳到主要内容

Graph API

POST /v1/users/:user_id/graph/edges

在两个记忆对象之间创建一条图谱边。

请求

POST /v1/users/user_123/graph/edges
Authorization: Bearer <token>
Content-Type: application/json

{
"source_id": "11111111-1111-1111-1111-111111111111",
"target_id": "22222222-2222-2222-2222-222222222222",
"relation": "RelatedTo",
"weight": 0.8
}

字段

字段类型必填说明
source_idUUID源记忆或任务节点
target_idUUID目标记忆或任务节点
relationstring关系类型
weightnumber可选权重

返回

{
"status": "accepted"
}

支持的关系类型

NextRelatedToContradictsSupportsAbstractsDerivedFromCausedByEvolvedToIsSubTaskOfBlocksAccomplishes