{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Suggest emoji whose meaning best matches a short passage of text.",
"errors": [
{
"description": "text exceeds the 600-unit limit (counted in Unicode code points/runes, not graphemes).",
"name": "TextTooLong"
},
{
"description": "no suggestion cleared the minimum score.",
"name": "NoMatch"
},
{
"description": "too many requests from this client; slow down and retry.",
"name": "RateLimitExceeded"
},
{
"description": "the server is at capacity and shed this request; retry after a short delay.",
"name": "Overloaded"
}
],
"output": {
"encoding": "application/json",
"schema": {
"properties": {
"suggestions": {
"items": {
"ref": "#suggestion",
"type": "ref"
},
"type": "array"
}
},
"required": [
"suggestions"
],
"type": "object"
}
},
"parameters": {
"properties": {
"limit": {
"default": 3,
"description": "Maximum number of suggestions to return.",
"maximum": 5,
"minimum": 1,
"type": "integer"
},
"text": {
"description": "The passage of text to match, up to 600 units. Despite the maxGraphemes field name, the limit is actually enforced in Unicode code points (runes), not user-perceived graphemes — a single multi-rune grapheme cluster (e.g. a ZWJ family emoji) counts as multiple units toward it. maxLength is in UTF-8 bytes, not runes — emoji-laden input can run up to 4 bytes per rune. Note that the underlying model reads at most 256 tokens (~1300 runes of ordinary English, far fewer for punctuation-dense text); anything beyond that is ignored rather than rejected, and a long passage whose subject is a small fraction of the text tends to yield a generic suggestion.",
"maxGraphemes": 600,
"maxLength": 2400,
"type": "string"
}
},
"required": [
"text"
],
"type": "params"
},
"type": "query"
},
"suggestion": {
"properties": {
"emoji": {
"description": "The suggested emoji.",
"type": "string"
},
"name": {
"description": "The emoji's CLDR label.",
"type": "string"
},
"score": {
"description": "A similarity score — cosine similarity between the query and this emoji's meaning, adjusted by a per-emoji penalty that suppresses generically-matching emoji — expressed in per-mille (parts per thousand, 0-1000). This is not basis points (which would be parts per ten-thousand). Divide by 1000 for the 0..1 float value used internally — this is an integer because the lexicon primitive set has no float type.",
"maximum": 1000,
"minimum": 0,
"type": "integer"
}
},
"required": [
"emoji",
"name",
"score"
],
"type": "object"
}
},
"id": "me.byjp.emojify.suggestEmoji",
"lexicon": 1
}