TakeShape Resolvers
TakeShape resolvers are primarily internal-use only.
name
Type
string!
Values
takeshape:search
takeshape:vectorSearch
takeshape:queryApiIndex
takeshape:getUser
shapeName
Type
string
Description
Required for takeshape:vectorSearch
and takeshape:queryApiIndex
. The name of the Shape
this resolver should act upon. The Shape
indicated must be indexed (cache.enabled
set to true
and loaders.list
defined).
options
The options object contains configuration specific to the type of resolver you select.
args
Type
Description
Allows mapping from the QueryContext to the args values (input arguments) for the resolver. Results are not serialized. For more information read about the ParameterConfig.
takeshape:vectorSearch
requires the vector
and size
arg to be mapped. vector
is an object with a name
and value
properties and size
is an integer.
vector
name
- the name of the vector property to comparevalue
- an array of floats (vector) to compare to
size
The number of nearest neighbors to find. (k
)
Example:
{
"name": "takeshape:vectorSearch",
"service": "takeshape",
"shapeName": "books:Book",
"args": {
"ops": [
{ "path": "vector.name", "value": "vector" },
{
"path": "vector.value",
"mapping": "$resolvers.createEmbedding.vector"
},
{ "path": "size", "mapping": "$args.size" }
]
}
}
results
Type
Description
Allows mapping from the QueryContext to the results for the resolver step in a ComposeResolver or whole query. Results are not serialized. For more information read about the ParameterConfig.