All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.
| Language | Package |
|---|---|
TypeScript |
@cdklabs/generative-ai-cdk-constructs |
Python |
cdklabs.generative_ai_cdk_constructs |
Java |
io.github.cdklabs.generative_ai_cdk_constructs |
.Net |
CdkLabs.GenerativeAICdkConstructs |
Go |
github.com/cdklabs/generative-ai-cdk-constructs-go/generativeaicdkconstructs |
This construct library provides a class that defines an existing OpenSearch managed cluster to be used as a vector store for a Knowledge Base.
See the API documentation.
TypeScript
ts fixture=default-bedrock
new genaicdk.opensearchmanagedcluster.OpenSearchManagedClusterVectorStore({
domainArn: 'arn:aws:es:region:account:domain/your-domain',
domainEndpoint: 'https://your-domain.region.es.amazonaws.com',
vectorIndexName: 'your-vector-index',
fieldMapping: {
metadataField: 'metadata',
textField: 'text',
vectorField: 'vector'
}
});