
com.pulumi.awsnative.bedrock.kotlin.inputs.DataSourceChunkingConfigurationArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.bedrock.kotlin.inputs
import com.pulumi.awsnative.bedrock.inputs.DataSourceChunkingConfigurationArgs.builder
import com.pulumi.awsnative.bedrock.kotlin.enums.DataSourceChunkingStrategy
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Details about how to chunk the documents in the data source. A chunk refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried.
* @property chunkingStrategy Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for `NONE` , then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
* - `FIXED_SIZE` – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the `fixedSizeChunkingConfiguration` .
* - `HIERARCHICAL` – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
* - `SEMANTIC` – Split documents into chunks based on groups of similar content derived with natural language processing.
* - `NONE` – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
* @property fixedSizeChunkingConfiguration Configurations for when you choose fixed-size chunking. If you set the `chunkingStrategy` as `NONE` , exclude this field.
*/
public data class DataSourceChunkingConfigurationArgs(
public val chunkingStrategy: Output,
public val fixedSizeChunkingConfiguration: Output? =
null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.bedrock.inputs.DataSourceChunkingConfigurationArgs =
com.pulumi.awsnative.bedrock.inputs.DataSourceChunkingConfigurationArgs.builder()
.chunkingStrategy(chunkingStrategy.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.fixedSizeChunkingConfiguration(
fixedSizeChunkingConfiguration?.applyValue({ args0 ->
args0.let({ args0 -> args0.toJava() })
}),
).build()
}
/**
* Builder for [DataSourceChunkingConfigurationArgs].
*/
@PulumiTagMarker
public class DataSourceChunkingConfigurationArgsBuilder internal constructor() {
private var chunkingStrategy: Output? = null
private var fixedSizeChunkingConfiguration: Output? =
null
/**
* @param value Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for `NONE` , then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
* - `FIXED_SIZE` – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the `fixedSizeChunkingConfiguration` .
* - `HIERARCHICAL` – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
* - `SEMANTIC` – Split documents into chunks based on groups of similar content derived with natural language processing.
* - `NONE` – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
*/
@JvmName("rukleoflbfsdlhco")
public suspend fun chunkingStrategy(`value`: Output) {
this.chunkingStrategy = value
}
/**
* @param value Configurations for when you choose fixed-size chunking. If you set the `chunkingStrategy` as `NONE` , exclude this field.
*/
@JvmName("fjhftvcrxohfmkbj")
public suspend fun fixedSizeChunkingConfiguration(`value`: Output) {
this.fixedSizeChunkingConfiguration = value
}
/**
* @param value Knowledge base can split your source data into chunks. A *chunk* refers to an excerpt from a data source that is returned when the knowledge base that it belongs to is queried. You have the following options for chunking your data. If you opt for `NONE` , then you may want to pre-process your files by splitting them up such that each file corresponds to a chunk.
* - `FIXED_SIZE` – Amazon Bedrock splits your source data into chunks of the approximate size that you set in the `fixedSizeChunkingConfiguration` .
* - `HIERARCHICAL` – Split documents into layers of chunks where the first layer contains large chunks, and the second layer contains smaller chunks derived from the first layer.
* - `SEMANTIC` – Split documents into chunks based on groups of similar content derived with natural language processing.
* - `NONE` – Amazon Bedrock treats each file as one chunk. If you choose this option, you may want to pre-process your documents by splitting them into separate files.
*/
@JvmName("tgihwggqadkeibuo")
public suspend fun chunkingStrategy(`value`: DataSourceChunkingStrategy) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.chunkingStrategy = mapped
}
/**
* @param value Configurations for when you choose fixed-size chunking. If you set the `chunkingStrategy` as `NONE` , exclude this field.
*/
@JvmName("vvwepiasedlupkab")
public suspend fun fixedSizeChunkingConfiguration(`value`: DataSourceFixedSizeChunkingConfigurationArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.fixedSizeChunkingConfiguration = mapped
}
/**
* @param argument Configurations for when you choose fixed-size chunking. If you set the `chunkingStrategy` as `NONE` , exclude this field.
*/
@JvmName("ppkpgqrujonliovu")
public suspend fun fixedSizeChunkingConfiguration(argument: suspend DataSourceFixedSizeChunkingConfigurationArgsBuilder.() -> Unit) {
val toBeMapped = DataSourceFixedSizeChunkingConfigurationArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.fixedSizeChunkingConfiguration = mapped
}
internal fun build(): DataSourceChunkingConfigurationArgs = DataSourceChunkingConfigurationArgs(
chunkingStrategy = chunkingStrategy ?: throw PulumiNullFieldException("chunkingStrategy"),
fixedSizeChunkingConfiguration = fixedSizeChunkingConfiguration,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy