QnAIntentConfigurationProperty Struct
Details about the the configuration of the built-in Amazon.QnAIntent .
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lex as lex } from 'aws-cdk-lib';
const qnAIntentConfigurationProperty: lex.CfnBot.QnAIntentConfigurationProperty = {
bedrockModelConfiguration: {
modelArn: 'modelArn',
// the properties below are optional
bedrockGuardrailConfiguration: {
bedrockGuardrailIdentifier: 'bedrockGuardrailIdentifier',
bedrockGuardrailVersion: 'bedrockGuardrailVersion',
},
bedrockModelCustomPrompt: 'bedrockModelCustomPrompt',
bedrockTraceStatus: 'bedrockTraceStatus',
},
dataSourceConfiguration: {
bedrockKnowledgeStoreConfiguration: {
bedrockKnowledgeBaseArn: 'bedrockKnowledgeBaseArn',
bkbExactResponseFields: {
answerField: 'answerField',
},
exactResponse: false,
},
kendraConfiguration: {
exactResponse: false,
kendraIndex: 'kendraIndex',
queryFilterStringEnabled: false,
// the properties below are optional
queryFilterString: 'queryFilterString',
},
opensearchConfiguration: {
domainEndpoint: 'domainEndpoint',
exactResponse: false,
exactResponseFields: {
answerField: 'answerField',
questionField: 'questionField',
},
includeFields: ['includeFields'],
indexName: 'indexName',
},
},
};
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_lex as lex
qn_a_intent_configuration_property = lex.CfnBot.QnAIntentConfigurationProperty(
bedrock_model_configuration=lex.CfnBot.BedrockModelSpecificationProperty(
model_arn="modelArn",
# the properties below are optional
bedrock_guardrail_configuration=lex.CfnBot.BedrockGuardrailConfigurationProperty(
bedrock_guardrail_identifier="bedrockGuardrailIdentifier",
bedrock_guardrail_version="bedrockGuardrailVersion"
),
bedrock_model_custom_prompt="bedrockModelCustomPrompt",
bedrock_trace_status="bedrockTraceStatus"
),
data_source_configuration=lex.CfnBot.DataSourceConfigurationProperty(
bedrock_knowledge_store_configuration=lex.CfnBot.BedrockKnowledgeStoreConfigurationProperty(
bedrock_knowledge_base_arn="bedrockKnowledgeBaseArn",
bkb_exact_response_fields=lex.CfnBot.BKBExactResponseFieldsProperty(
answer_field="answerField"
),
exact_response=False
),
kendra_configuration=lex.CfnBot.QnAKendraConfigurationProperty(
exact_response=False,
kendra_index="kendraIndex",
query_filter_string_enabled=False,
# the properties below are optional
query_filter_string="queryFilterString"
),
opensearch_configuration=lex.CfnBot.OpensearchConfigurationProperty(
domain_endpoint="domainEndpoint",
exact_response=False,
exact_response_fields=lex.CfnBot.ExactResponseFieldsProperty(
answer_field="answerField",
question_field="questionField"
),
include_fields=["includeFields"],
index_name="indexName"
)
)
)
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.lex.*;
QnAIntentConfigurationProperty qnAIntentConfigurationProperty = QnAIntentConfigurationProperty.builder()
.bedrockModelConfiguration(BedrockModelSpecificationProperty.builder()
.modelArn("modelArn")
// the properties below are optional
.bedrockGuardrailConfiguration(BedrockGuardrailConfigurationProperty.builder()
.bedrockGuardrailIdentifier("bedrockGuardrailIdentifier")
.bedrockGuardrailVersion("bedrockGuardrailVersion")
.build())
.bedrockModelCustomPrompt("bedrockModelCustomPrompt")
.bedrockTraceStatus("bedrockTraceStatus")
.build())
.dataSourceConfiguration(DataSourceConfigurationProperty.builder()
.bedrockKnowledgeStoreConfiguration(BedrockKnowledgeStoreConfigurationProperty.builder()
.bedrockKnowledgeBaseArn("bedrockKnowledgeBaseArn")
.bkbExactResponseFields(BKBExactResponseFieldsProperty.builder()
.answerField("answerField")
.build())
.exactResponse(false)
.build())
.kendraConfiguration(QnAKendraConfigurationProperty.builder()
.exactResponse(false)
.kendraIndex("kendraIndex")
.queryFilterStringEnabled(false)
// the properties below are optional
.queryFilterString("queryFilterString")
.build())
.opensearchConfiguration(OpensearchConfigurationProperty.builder()
.domainEndpoint("domainEndpoint")
.exactResponse(false)
.exactResponseFields(ExactResponseFieldsProperty.builder()
.answerField("answerField")
.questionField("questionField")
.build())
.includeFields(List.of("includeFields"))
.indexName("indexName")
.build())
.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.Lex;
var qnAIntentConfigurationProperty = new QnAIntentConfigurationProperty {
BedrockModelConfiguration = new BedrockModelSpecificationProperty {
ModelArn = "modelArn",
// the properties below are optional
BedrockGuardrailConfiguration = new BedrockGuardrailConfigurationProperty {
BedrockGuardrailIdentifier = "bedrockGuardrailIdentifier",
BedrockGuardrailVersion = "bedrockGuardrailVersion"
},
BedrockModelCustomPrompt = "bedrockModelCustomPrompt",
BedrockTraceStatus = "bedrockTraceStatus"
},
DataSourceConfiguration = new DataSourceConfigurationProperty {
BedrockKnowledgeStoreConfiguration = new BedrockKnowledgeStoreConfigurationProperty {
BedrockKnowledgeBaseArn = "bedrockKnowledgeBaseArn",
BkbExactResponseFields = new BKBExactResponseFieldsProperty {
AnswerField = "answerField"
},
ExactResponse = false
},
KendraConfiguration = new QnAKendraConfigurationProperty {
ExactResponse = false,
KendraIndex = "kendraIndex",
QueryFilterStringEnabled = false,
// the properties below are optional
QueryFilterString = "queryFilterString"
},
OpensearchConfiguration = new OpensearchConfigurationProperty {
DomainEndpoint = "domainEndpoint",
ExactResponse = false,
ExactResponseFields = new ExactResponseFieldsProperty {
AnswerField = "answerField",
QuestionField = "questionField"
},
IncludeFields = new [] { "includeFields" },
IndexName = "indexName"
}
}
};
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"
qnAIntentConfigurationProperty := &QnAIntentConfigurationProperty{
BedrockModelConfiguration: &BedrockModelSpecificationProperty{
ModelArn: jsii.String("modelArn"),
// the properties below are optional
BedrockGuardrailConfiguration: &BedrockGuardrailConfigurationProperty{
BedrockGuardrailIdentifier: jsii.String("bedrockGuardrailIdentifier"),
BedrockGuardrailVersion: jsii.String("bedrockGuardrailVersion"),
},
BedrockModelCustomPrompt: jsii.String("bedrockModelCustomPrompt"),
BedrockTraceStatus: jsii.String("bedrockTraceStatus"),
},
DataSourceConfiguration: &DataSourceConfigurationProperty{
BedrockKnowledgeStoreConfiguration: &BedrockKnowledgeStoreConfigurationProperty{
BedrockKnowledgeBaseArn: jsii.String("bedrockKnowledgeBaseArn"),
BkbExactResponseFields: &BKBExactResponseFieldsProperty{
AnswerField: jsii.String("answerField"),
},
ExactResponse: jsii.Boolean(false),
},
KendraConfiguration: &QnAKendraConfigurationProperty{
ExactResponse: jsii.Boolean(false),
KendraIndex: jsii.String("kendraIndex"),
QueryFilterStringEnabled: jsii.Boolean(false),
// the properties below are optional
QueryFilterString: jsii.String("queryFilterString"),
},
OpensearchConfiguration: &OpensearchConfigurationProperty{
DomainEndpoint: jsii.String("domainEndpoint"),
ExactResponse: jsii.Boolean(false),
ExactResponseFields: &ExactResponseFieldsProperty{
AnswerField: jsii.String("answerField"),
QuestionField: jsii.String("questionField"),
},
IncludeFields: []*string{
jsii.String("includeFields"),
},
IndexName: jsii.String("indexName"),
},
},
}
Properties
bedrockModelConfigurationIResolvable | CfnBot.BedrockModelSpecificationPropertybedrock_model_configurationtyping.Union[IResolvable, BedrockModelSpecificationProperty]bedrockModelConfigurationIResolvableBedrockModelConfigurationIResolvableBedrockModelConfigurationinterface{}required#dataSourceConfigurationIResolvable | CfnBot.DataSourceConfigurationPropertydata_source_configurationtyping.Union[IResolvable, DataSourceConfigurationProperty]dataSourceConfigurationIResolvableDataSourceConfigurationIResolvableDataSourceConfigurationinterface{}required#Contains details about the configuration of the data source used for the `AMAZON.QnAIntent` .