You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// A type alias to a type with a check.
type MultipleAttrs = int @assert({{ this > 0 }}) @check(gt_ten, {{ this > 10 }})
// That alias is used as a parameter.
function AliasWithMultipleAttrs(money: MultipleAttrs) -> MultipleAttrs {
client "openai/gpt-4o"
prompt r#"
Return the given integer without additional context:
{{ money }}
{{ ctx.output_format }}
"#
}
This code passes validation, but won't work at runtime, because there is to way to construct a Checked value on the client.
We don't currently support checked values as function parameters, so we should also forbid them when they are behind a type alias.
The text was updated successfully, but these errors were encountered:
This code passes validation, but won't work at runtime, because there is to way to construct a Checked value on the client.
We don't currently support checked values as function parameters, so we should also forbid them when they are behind a type alias.
The text was updated successfully, but these errors were encountered: