KnowledgeBaseOrchestrationConfigurationProperty Struct
Configures how the knowledge base orchestrates the retrieval and generation process, allowing for customization of prompts, inference parameters, and performance settings.
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';
declare const additionalModelRequestFields: any;
const knowledgeBaseOrchestrationConfigurationProperty: bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty = {
additionalModelRequestFields: additionalModelRequestFields,
inferenceConfig: {
text: {
maxTokens: 123,
stopSequences: ['stopSequences'],
temperature: 123,
topP: 123,
},
},
performanceConfig: {
latency: 'latency',
},
promptTemplate: {
textPromptTemplate: 'textPromptTemplate',
},
};
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
# additional_model_request_fields: Any
knowledge_base_orchestration_configuration_property = bedrock.CfnFlowVersion.KnowledgeBaseOrchestrationConfigurationProperty(
additional_model_request_fields=additional_model_request_fields,
inference_config=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
max_tokens=123,
stop_sequences=["stopSequences"],
temperature=123,
top_p=123
)
),
performance_config=bedrock.CfnFlowVersion.PerformanceConfigurationProperty(
latency="latency"
),
prompt_template=bedrock.CfnFlowVersion.KnowledgeBasePromptTemplateProperty(
text_prompt_template="textPromptTemplate"
)
)
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.*;
Object additionalModelRequestFields;
KnowledgeBaseOrchestrationConfigurationProperty knowledgeBaseOrchestrationConfigurationProperty = KnowledgeBaseOrchestrationConfigurationProperty.builder()
.additionalModelRequestFields(additionalModelRequestFields)
.inferenceConfig(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.performanceConfig(PerformanceConfigurationProperty.builder()
.latency("latency")
.build())
.promptTemplate(KnowledgeBasePromptTemplateProperty.builder()
.textPromptTemplate("textPromptTemplate")
.build())
.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 additionalModelRequestFields;
var knowledgeBaseOrchestrationConfigurationProperty = new KnowledgeBaseOrchestrationConfigurationProperty {
AdditionalModelRequestFields = additionalModelRequestFields,
InferenceConfig = new PromptInferenceConfigurationProperty {
Text = new PromptModelInferenceConfigurationProperty {
MaxTokens = 123,
StopSequences = new [] { "stopSequences" },
Temperature = 123,
TopP = 123
}
},
PerformanceConfig = new PerformanceConfigurationProperty {
Latency = "latency"
},
PromptTemplate = new KnowledgeBasePromptTemplateProperty {
TextPromptTemplate = "textPromptTemplate"
}
};
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"
var additionalModelRequestFields interface{}
knowledgeBaseOrchestrationConfigurationProperty := &KnowledgeBaseOrchestrationConfigurationProperty{
AdditionalModelRequestFields: additionalModelRequestFields,
InferenceConfig: &PromptInferenceConfigurationProperty{
Text: &PromptModelInferenceConfigurationProperty{
MaxTokens: jsii.Number(123),
StopSequences: []*string{
jsii.String("stopSequences"),
},
Temperature: jsii.Number(123),
TopP: jsii.Number(123),
},
},
PerformanceConfig: &PerformanceConfigurationProperty{
Latency: jsii.String("latency"),
},
PromptTemplate: &KnowledgeBasePromptTemplateProperty{
TextPromptTemplate: jsii.String("textPromptTemplate"),
},
}
Properties
additionalModelRequestFieldsoptionalanyadditional_model_request_fieldsoptionalAnyadditionalModelRequestFieldsoptionalObjectAdditionalModelRequestFieldsoptionalobjectAdditionalModelRequestFieldsoptionalinterface{}#The additional model-specific request parameters as key-value pairs to be included in the request to the foundation model.
inferenceConfigoptionalIResolvable | CfnFlowVersion.PromptInferenceConfigurationPropertyinference_configoptionaltyping.Union[IResolvable, PromptInferenceConfigurationProperty]inferenceConfigoptionalIResolvableInferenceConfigoptionalIResolvableInferenceConfigoptionalinterface{}#Contains inference configurations for the prompt.
performanceConfigoptionalIResolvable | CfnFlowVersion.PerformanceConfigurationPropertyperformance_configoptionaltyping.Union[IResolvable, PerformanceConfigurationProperty]performanceConfigoptionalIResolvablePerformanceConfigoptionalIResolvablePerformanceConfigoptionalinterface{}#The performance configuration options for the knowledge base retrieval and generation process.
promptTemplateoptionalIResolvable | CfnFlowVersion.KnowledgeBasePromptTemplatePropertyprompt_templateoptionaltyping.Union[IResolvable, KnowledgeBasePromptTemplateProperty]promptTemplateoptionalIResolvablePromptTemplateoptionalIResolvablePromptTemplateoptionalinterface{}#A custom prompt template for orchestrating the retrieval and generation process.