Edgewise API
Docs
GitHub
Preparing search index...
helpers
route
Function route
route
<
K
extends
string
>
(
prompt
:
string
,
lanes
:
Record
<
K
,
string
>
,
o
?:
CommonOptions
&
{
model
?:
ModelRef
;
otherwise
?:
NoInfer
<
K
>
;
threshold
?:
number
;
}
,
)
:
Promise
<
{
confidence
:
number
;
fellBack
:
boolean
;
probabilities
:
Record
<
K
,
number
>
;
route
:
K
;
}
,
>
Pick the lane a prompt belongs to.
Type Parameters
K
extends
string
Parameters
prompt
:
string
lanes
:
Record
<
K
,
string
>
o
:
CommonOptions
&
{
model
?:
ModelRef
;
otherwise
?:
NoInfer
<
K
>
;
threshold
?:
number
}
= {}
Returns
Promise
<
{
confidence
:
number
;
fellBack
:
boolean
;
probabilities
:
Record
<
K
,
number
>
;
route
:
K
;
}
,
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
Docs
GitHub
Edgewise API
Loading...
Pick the lane a prompt belongs to.