AI SDK Kotlin
Toggle table of contents
0.3.0-beta01
common
Target filter
common
Switch theme
Search in API
Skip to content
AI SDK Kotlin
AI SDK Kotlin
/
ai.torad.aisdk
/
Output
/
Choice
Choice
class
Choice
<
T
>
(
val
options
:
List
<
T
>
,
val
encode
:
(
T
)
->
String
,
val
decodeChoice
:
(
String
)
->
T
,
val
name
:
String
=
"choice"
,
val
schemaDescription
:
String
?
=
null
)
:
Output
<
T
>
(
source
)
Since
0.3.0-beta01
Members
Constructors
Choice
Link copied to clipboard
constructor
(
options
:
List
<
T
>
,
encode
:
(
T
)
->
String
,
decodeChoice
:
(
String
)
->
T
,
name
:
String
=
"choice"
,
schemaDescription
:
String
?
=
null
)
Properties
decode
Choice
Link copied to clipboard
val
decodeChoice
:
(
String
)
->
T
encode
Link copied to clipboard
val
encode
:
(
T
)
->
String
name
Link copied to clipboard
val
name
:
String
options
Link copied to clipboard
val
options
:
List
<
T
>
schema
Link copied to clipboard
open
val
schema
:
JsonElement
schema
Description
Link copied to clipboard
open
override
val
schemaDescription
:
String
?
schema
Json
Link copied to clipboard
open
override
val
schemaJson
:
String
schema
Name
Link copied to clipboard
open
override
val
schemaName
:
String
Functions
decode
Link copied to clipboard
open
override
fun
decode
(
text
:
String
)
:
T
to
Response
Format
Link copied to clipboard
fun
toResponseFormat
(
)
:
ResponseFormat