Choose an option with Jev
jev.choiceSelects one option from defined criteria for a given state and returns the choice, per-option probabilities, and confidence; can include up to four images.
Instructions
Ask TypeSafe Jev to pick one option for some state. criteria maps option names to descriptions (or null), up to 255 options; include a "none" option when nothing may fit. Returns answer.choice, answer.probabilities per option and answer.confidence.
state is the content to judge (a string, or a JSON object/array). instructions must state the full question; refer to parts of structured state with backticked paths such as ticket.messages[0].text. model is optional. images (optional, up to 4 PNG, JPEG or WebP, 4 MiB each) are judged together with state; each is either { "path": "" } for a local file inside a directory the server allows (JEV_IMAGE_DIRS), or { "data": "data:image/png;base64,..." }. Only image-capable models accept images (for example cloudflare/clef or cloudflare/clef-flash through OpenRouter); other models reject them. Never put images inside state. To ask several questions about the same state, use jev.evaluate instead: it answers them in one request. provider is optional; this server offers only "typesafe".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | ||
| state | Yes | ||
| images | No | ||
| criteria | Yes | ||
| provider | No | ||
| instructions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | The model that answered, usually a versioned ID | |
| usage | Yes | ||
| answer | Yes | ||
| provider | No | The provider that answered |