Selectors¶
LlamaIndex BaseSelectors. Single-route uses one Choice; multi-route uses one Noul per option.
JevSingleSelector¶
| Argument | Default | Notes |
|---|---|---|
provider |
"typesafe" |
"typesafe" or "openrouter" |
model |
"jev-latest" |
Remapped to ~typesafe/... on OpenRouter |
default_index |
None |
Fallback index if Jev fails; otherwise raise |
confidence_threshold |
None |
Low / missing confidence is failure |
timeout_s |
2.5 |
HTTP timeout |
api_key |
env var | Constructor-only; see providers |
Bases: _JevSelectorBase
Pick exactly one choice with a Jev Choice question.
Fail-closed: an API error, an out-of-schema choice, or a confidence
miss either raises or (if default_index is set) returns that index.
Create a single-choice selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
TypeSafe or OpenRouter key. Falls back to
|
None
|
model
|
str
|
TypeSafe model id; remapped to |
'jev-latest'
|
default_index
|
int | None
|
Selection index if Jev fails. If omitted, failures raise. |
None
|
confidence_threshold
|
float | None
|
Treat a Choice below this confidence as
failure (raise or |
None
|
timeout_s
|
float
|
HTTP timeout forwarded to the client. |
2.5
|
provider
|
str
|
|
'typesafe'
|
Source code in packages/llama-index-selectors-jev/llama_index/selectors/jev/base.py
JevMultiSelector¶
| Argument | Default | Notes |
|---|---|---|
provider |
"typesafe" |
"typesafe" or "openrouter" |
model |
"jev-latest" |
Remapped to ~typesafe/... on OpenRouter |
threshold |
0.5 |
Keep options with noul > threshold |
default_index |
None |
API-error fallback only, not empty-Noul |
timeout_s |
2.5 |
HTTP timeout |
api_key |
env var | Constructor-only; see providers |
Bases: _JevSelectorBase
Keep every choice whose Noul is above threshold.
One system_one call carries one Noul per option (chunked at 255).
If nothing clears the threshold, return the single highest-noul choice.
default_index is used only when the API call itself fails.
Create a multi-choice selector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
api_key
|
str | None
|
TypeSafe or OpenRouter key. Falls back to
|
None
|
model
|
str
|
TypeSafe model id; remapped to |
'jev-latest'
|
threshold
|
float
|
Keep options whose Noul is strictly above this value. |
0.5
|
default_index
|
int | None
|
Selection index if the API call fails. Not used
when every Noul is at or below |
None
|
timeout_s
|
float
|
HTTP timeout forwarded to the client. |
2.5
|
provider
|
str
|
|
'typesafe'
|