QueryGenerationContextProperty Struct
Contains configurations for context to use during query generation.
| 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 queryGenerationContextProperty: bedrock.CfnKnowledgeBase.QueryGenerationContextProperty = {
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_context_property = 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.*;
QueryGenerationContextProperty queryGenerationContextProperty = 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();
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 queryGenerationContextProperty = 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"
queryGenerationContextProperty := &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
curatedQueriesoptionalIResolvable | IResolvable | CfnKnowledgeBase.curated_queriesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, CuratedQueryProperty]]]curatedQueriesoptionalIResolvableCuratedQueriesoptionalIResolvableCuratedQueriesoptionalinterface{} #An array of objects, each of which defines information about example queries to help the query engine generate appropriate SQL queries.
tablesoptionalIResolvable | IResolvable | CfnKnowledgeBase.tablesoptionaltyping.Union[IResolvable, typing.List[typing.Union[IResolvable, QueryGenerationTableProperty]]]tablesoptionalIResolvableTablesoptionalIResolvableTablesoptionalinterface{} #An array of objects, each of which defines information about a table in the database.