commonMain.aws.sdk.kotlin.services.bedrockruntime.model.ToolChoice.kt Maven / Gradle / Ivy
// Code generated by smithy-kotlin-codegen. DO NOT EDIT!
package aws.sdk.kotlin.services.bedrockruntime.model
/**
* Determines which tools the model should request in a call to `Converse` or `ConverseStream`. `ToolChoice` is only supported by Anthropic Claude 3 models and by Mistral AI Mistral Large.
*/
public sealed class ToolChoice {
/**
* The model must request at least one tool (no text is generated).
*/
public data class Any(val value: aws.sdk.kotlin.services.bedrockruntime.model.AnyToolChoice) : aws.sdk.kotlin.services.bedrockruntime.model.ToolChoice() {
}
/**
* (Default). The Model automatically decides if a tool should be called or whether to generate text instead.
*/
public data class Auto(val value: aws.sdk.kotlin.services.bedrockruntime.model.AutoToolChoice) : aws.sdk.kotlin.services.bedrockruntime.model.ToolChoice() {
}
/**
* The Model must request the specified tool. Only supported by Anthropic Claude 3 models.
*/
public data class Tool(val value: aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice) : aws.sdk.kotlin.services.bedrockruntime.model.ToolChoice() {
}
public object SdkUnknown : aws.sdk.kotlin.services.bedrockruntime.model.ToolChoice() {
}
/**
* Casts this [ToolChoice] as a [Any] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.AnyToolChoice] value. Throws an exception if the [ToolChoice] is not a
* [Any].
*/
public fun asAny(): aws.sdk.kotlin.services.bedrockruntime.model.AnyToolChoice = (this as ToolChoice.Any).value
/**
* Casts this [ToolChoice] as a [Any] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.AnyToolChoice] value. Returns null if the [ToolChoice] is not a [Any].
*/
public fun asAnyOrNull(): aws.sdk.kotlin.services.bedrockruntime.model.AnyToolChoice? = (this as? ToolChoice.Any)?.value
/**
* Casts this [ToolChoice] as a [Auto] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.AutoToolChoice] value. Throws an exception if the [ToolChoice] is not a
* [Auto].
*/
public fun asAuto(): aws.sdk.kotlin.services.bedrockruntime.model.AutoToolChoice = (this as ToolChoice.Auto).value
/**
* Casts this [ToolChoice] as a [Auto] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.AutoToolChoice] value. Returns null if the [ToolChoice] is not a [Auto].
*/
public fun asAutoOrNull(): aws.sdk.kotlin.services.bedrockruntime.model.AutoToolChoice? = (this as? ToolChoice.Auto)?.value
/**
* Casts this [ToolChoice] as a [Tool] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice] value. Throws an exception if the [ToolChoice] is not a
* [Tool].
*/
public fun asTool(): aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice = (this as ToolChoice.Tool).value
/**
* Casts this [ToolChoice] as a [Tool] and retrieves its [aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice] value. Returns null if the [ToolChoice] is not a [Tool].
*/
public fun asToolOrNull(): aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice? = (this as? ToolChoice.Tool)?.value
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy