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 |
This construct library provides a class that defines an existing Pinecone database to be used for a vector store for a Knowledge Base.
See the API documentation.
TypeScript
import { pinecone } from '@cdklabs/generative-ai-cdk-constructs';
new pinecone.PineconeVectorStore({
connectionString: 'https://your-index-1234567.svc.gcp-starter.pinecone.io',
credentialsSecretArn: 'arn:aws:secretsmanager:your-region:123456789876:secret:your-key-name',
textField: 'question',
metadataField: 'metadata'
});
Python
from cdklabs.generative_ai_cdk_constructs import (
pinecone
)
pineconevs = pinecone.PineconeVectorStore(
connection_string='https://your-index-1234567.svc.gcp-starter.pinecone.io',
credentials_secret_arn='arn:aws:secretsmanager:your-region:123456789876:secret:your-key-name',
)