Skip to content
v2.277.0

PromptModelInferenceConfigurationProperty Struct ​

Contains inference configurations related to model inference for a prompt.

For more information, see Inference parameters .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const promptModelInferenceConfigurationProperty: bedrock.CfnPromptVersion.PromptModelInferenceConfigurationProperty = {
  maxTokens: 123,
  stopSequences: ['stopSequences'],
  temperature: 123,
  topP: 123,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_model_inference_configuration_property = bedrock.CfnPromptVersion.PromptModelInferenceConfigurationProperty(
    max_tokens=123,
    stop_sequences=["stopSequences"],
    temperature=123,
    top_p=123
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.*;

PromptModelInferenceConfigurationProperty promptModelInferenceConfigurationProperty = PromptModelInferenceConfigurationProperty.builder()
        .maxTokens(123)
        .stopSequences(List.of("stopSequences"))
        .temperature(123)
        .topP(123)
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;

var promptModelInferenceConfigurationProperty = new PromptModelInferenceConfigurationProperty {
    MaxTokens = 123,
    StopSequences = new [] { "stopSequences" },
    Temperature = 123,
    TopP = 123
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

promptModelInferenceConfigurationProperty := &PromptModelInferenceConfigurationProperty{
	MaxTokens: jsii.Number(123),
	StopSequences: []*string{
		jsii.String("stopSequences"),
	},
	Temperature: jsii.Number(123),
	TopP: jsii.Number(123),
}

Properties ​

maxTokensoptionalnumbermax_tokensoptionalint | floatmaxTokensoptionalNumberMaxTokensoptionaldoubleMaxTokensoptional*float64#
The maximum number of tokens to return in the response.
stopSequencesoptionalstring[]stop_sequencesoptionaltyping.List[str]stopSequencesoptionalList<String>StopSequencesoptionalstring[]StopSequencesoptional*[]*string#
A list of strings that define sequences after which the model will stop generating.
temperatureoptionalnumbertemperatureoptionalint | floattemperatureoptionalNumberTemperatureoptionaldoubleTemperatureoptional*float64#
Controls the randomness of the response.

Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

topPoptionalnumbertop_poptionalint | floattopPoptionalNumberTopPoptionaldoubleTopPoptional*float64#
The percentage of most-likely candidates that the model considers for the next token.