QueryGenerationConfigurationProperty Struct
Contains configurations for query generation.
For more information, see Build a knowledge base by connecting to a structured data source in the Amazon Bedrock User Guide..
| Source | |
|---|---|
| Type last changed |
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 queryGenerationConfigurationProperty: bedrock.CfnKnowledgeBase.QueryGenerationConfigurationProperty = {
executionTimeoutSeconds: 123,
generationContext: {
curatedQueries: [{
naturalLanguage: 'naturalLanguage',
sql: 'sql',
}],
tables: [{
name: 'name',
// the properties below are optional
columns: [{
description: 'description',
inclusion: 'inclusion',
name: 'name',
}],
description: 'description',
inclusion: 'inclusion',
}],
},
};
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
query_generation_configuration_property = bedrock.CfnKnowledgeBase.QueryGenerationConfigurationProperty(
execution_timeout_seconds=123,
generation_context=bedrock.CfnKnowledgeBase.QueryGenerationContextProperty(
curated_queries=[bedrock.CfnKnowledgeBase.CuratedQueryProperty(
natural_language="naturalLanguage",
sql="sql"
)],
tables=[bedrock.CfnKnowledgeBase.QueryGenerationTableProperty(
name="name",
# the properties below are optional
columns=[bedrock.CfnKnowledgeBase.QueryGenerationColumnProperty(
description="description",
inclusion="inclusion",
name="name"
)],
description="description",
inclusion="inclusion"
)]
)
)
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.*;
QueryGenerationConfigurationProperty queryGenerationConfigurationProperty = QueryGenerationConfigurationProperty.builder()
.executionTimeoutSeconds(123)
.generationContext(QueryGenerationContextProperty.builder()
.curatedQueries(List.of(CuratedQueryProperty.builder()
.naturalLanguage("naturalLanguage")
.sql("sql")
.build()))
.tables(List.of(QueryGenerationTableProperty.builder()
.name("name")
// the properties below are optional
.columns(List.of(QueryGenerationColumnProperty.builder()
.description("description")
.inclusion("inclusion")
.name("name")
.build()))
.description("description")
.inclusion("inclusion")
.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.Bedrock;
var queryGenerationConfigurationProperty = new QueryGenerationConfigurationProperty {
ExecutionTimeoutSeconds = 123,
GenerationContext = new QueryGenerationContextProperty {
CuratedQueries = new [] { new CuratedQueryProperty {
NaturalLanguage = "naturalLanguage",
Sql = "sql"
} },
Tables = new [] { new QueryGenerationTableProperty {
Name = "name",
// the properties below are optional
Columns = new [] { new QueryGenerationColumnProperty {
Description = "description",
Inclusion = "inclusion",
Name = "name"
} },
Description = "description",
Inclusion = "inclusion"
} }
}
};
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"
queryGenerationConfigurationProperty := &QueryGenerationConfigurationProperty{
ExecutionTimeoutSeconds: jsii.Number(123),
GenerationContext: &QueryGenerationContextProperty{
CuratedQueries: []interface{}{
&CuratedQueryProperty{
NaturalLanguage: jsii.String("naturalLanguage"),
Sql: jsii.String("sql"),
},
},
Tables: []interface{}{
&QueryGenerationTableProperty{
Name: jsii.String("name"),
// the properties below are optional
Columns: []interface{}{
&QueryGenerationColumnProperty{
Description: jsii.String("description"),
Inclusion: jsii.String("inclusion"),
Name: jsii.String("name"),
},
},
Description: jsii.String("description"),
Inclusion: jsii.String("inclusion"),
},
},
},
}
Properties
executionTimeoutSecondsoptionalnumberexecution_timeout_secondsoptionalint | floatexecutionTimeoutSecondsoptionalNumberExecutionTimeoutSecondsoptionaldoubleExecutionTimeoutSecondsoptional*float64 #The time after which query generation will time out.
generationContextoptionalIResolvable | CfnKnowledgeBase.generation_contextoptionaltyping.Union[IResolvable, QueryGenerationContextProperty]generationContextoptionalIResolvableGenerationContextoptionalIResolvableGenerationContextoptionalinterface{} #Specifies configurations for context to use during query generation.