garden.engram.getMemoryGraph
A space's newest memories and links between the ones that mean similar things, for drawing the space as a graph. Only memories indexed with the space's model are included. Each memory links to its nearest neighbors among the memories returned. Same authentication as garden.engram.searchMemories.
Details · query
| Kind | query |
|---|---|
| Authority | engram.garden |
| Indexed |
Checks
Validunlimited-stringdefs.main.parameters.properties.minSimilarityNo maxLength, maxGraphemes or format limits this string.unlimited-stringdefs.main.parameters.properties.spaceNo maxLength, maxGraphemes or format limits this string.
{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "A space's newest memories and links between the ones that mean similar things, for drawing the space as a graph. Only memories indexed with the space's model are included. Each memory links to its nearest neighbors among the memories returned. Same authentication as garden.engram.searchMemories.",
"errors": [
{
"description": "This service does not index the space.",
"name": "UnknownSpace"
},
{
"description": "The space has not declared an embedding model.",
"name": "NoModel"
}
],
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"edges": {
"items": {
"properties": {
"a": {
"description": "Position of one memory in nodes. Always smaller than b.",
"type": "integer"
},
"b": {
"description": "Position of the other memory in nodes.",
"type": "integer"
},
"similarity": {
"description": "Cosine similarity, times 1000.",
"maximum": 1000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"a",
"b",
"similarity"
],
"type": "object"
},
"type": "array"
},
"nodes": {
"description": "Newest first.",
"items": {
"ref": "garden.engram.defs#memoryView",
"type": "ref"
},
"type": "array"
}
},
"required": [
"nodes",
"edges"
],
"type": "object"
}
},
"parameters": {
"properties": {
"limit": {
"default": 200,
"description": "How many of the newest memories to include.",
"maximum": 500,
"minimum": 1,
"type": "integer"
},
"minSimilarity": {
"description": "A number above 0 and at most 1 (default 0.4): the cosine similarity a pair needs to be linked.",
"type": "string"
},
"neighbors": {
"default": 3,
"description": "How many of its most similar memories each memory links to.",
"maximum": 8,
"minimum": 1,
"type": "integer"
},
"space": {
"description": "The space URI.",
"type": "string"
}
},
"required": [
"space"
],
"type": "params"
},
"type": "query"
}
},
"id": "garden.engram.getMemoryGraph",
"lexicon": 1
}