All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.bedrock.kotlin.inputs.AgentInferenceConfigurationArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.bedrock.kotlin.inputs

import com.pulumi.awsnative.bedrock.inputs.AgentInferenceConfigurationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Configuration for inference in prompt configuration
 * @property maximumLength Maximum length of output
 * @property stopSequences List of stop sequences
 * @property temperature Controls randomness, higher values increase diversity
 * @property topK Sample from the k most likely next tokens
 * @property topP Cumulative probability cutoff for token selection
 */
public data class AgentInferenceConfigurationArgs(
    public val maximumLength: Output? = null,
    public val stopSequences: Output>? = null,
    public val temperature: Output? = null,
    public val topK: Output? = null,
    public val topP: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.bedrock.inputs.AgentInferenceConfigurationArgs =
        com.pulumi.awsnative.bedrock.inputs.AgentInferenceConfigurationArgs.builder()
            .maximumLength(maximumLength?.applyValue({ args0 -> args0 }))
            .stopSequences(stopSequences?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .temperature(temperature?.applyValue({ args0 -> args0 }))
            .topK(topK?.applyValue({ args0 -> args0 }))
            .topP(topP?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [AgentInferenceConfigurationArgs].
 */
@PulumiTagMarker
public class AgentInferenceConfigurationArgsBuilder internal constructor() {
    private var maximumLength: Output? = null

    private var stopSequences: Output>? = null

    private var temperature: Output? = null

    private var topK: Output? = null

    private var topP: Output? = null

    /**
     * @param value Maximum length of output
     */
    @JvmName("vyhfsuuahfiihhgs")
    public suspend fun maximumLength(`value`: Output) {
        this.maximumLength = value
    }

    /**
     * @param value List of stop sequences
     */
    @JvmName("yllomhoyckcfjdni")
    public suspend fun stopSequences(`value`: Output>) {
        this.stopSequences = value
    }

    @JvmName("ngcqbectanavadut")
    public suspend fun stopSequences(vararg values: Output) {
        this.stopSequences = Output.all(values.asList())
    }

    /**
     * @param values List of stop sequences
     */
    @JvmName("hkknkkimfxjeuvoy")
    public suspend fun stopSequences(values: List>) {
        this.stopSequences = Output.all(values)
    }

    /**
     * @param value Controls randomness, higher values increase diversity
     */
    @JvmName("jrptfsapberjwejt")
    public suspend fun temperature(`value`: Output) {
        this.temperature = value
    }

    /**
     * @param value Sample from the k most likely next tokens
     */
    @JvmName("cokytikoiveakmge")
    public suspend fun topK(`value`: Output) {
        this.topK = value
    }

    /**
     * @param value Cumulative probability cutoff for token selection
     */
    @JvmName("lxbtfflhmlkdxlob")
    public suspend fun topP(`value`: Output) {
        this.topP = value
    }

    /**
     * @param value Maximum length of output
     */
    @JvmName("xprdgvtublxirucb")
    public suspend fun maximumLength(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maximumLength = mapped
    }

    /**
     * @param value List of stop sequences
     */
    @JvmName("lsuhqhdujjwrwpaj")
    public suspend fun stopSequences(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.stopSequences = mapped
    }

    /**
     * @param values List of stop sequences
     */
    @JvmName("ckxfshnxjxscbqgq")
    public suspend fun stopSequences(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.stopSequences = mapped
    }

    /**
     * @param value Controls randomness, higher values increase diversity
     */
    @JvmName("wxhpokekdwpfgtdq")
    public suspend fun temperature(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.temperature = mapped
    }

    /**
     * @param value Sample from the k most likely next tokens
     */
    @JvmName("diyhmqftyhdpfvtg")
    public suspend fun topK(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topK = mapped
    }

    /**
     * @param value Cumulative probability cutoff for token selection
     */
    @JvmName("fignivakqyowhxmr")
    public suspend fun topP(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topP = mapped
    }

    internal fun build(): AgentInferenceConfigurationArgs = AgentInferenceConfigurationArgs(
        maximumLength = maximumLength,
        stopSequences = stopSequences,
        temperature = temperature,
        topK = topK,
        topP = topP,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy