tests.system.amazon.aws.example_bedrock_retrieve_and_generate¶
Attributes¶
Functions¶
External Sources were added in boto 1.34.90, skip this operator if the version is below that. |
|
|
Create security, network and data access policies within Amazon OpenSearch Serverless. |
|
Call the Amazon OpenSearch Serverless API and create a collection with the provided name. |
|
Use the OpenSearchPy client to create the vector index for the Amazon Open Search Serverless Collection. |
|
Download some sample data and upload it to 3S. |
|
Return a collection ARN for a given collection ID. |
|
Delete the Amazon Bedrock data source created earlier. |
|
Delete the Amazon Bedrock knowledge base created earlier. |
|
Delete the vector index created earlier. |
|
Delete the OpenSearch collection created earlier. |
|
Delete the security, network and data access policies created earlier. |
Module Contents¶
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.TITAN_MODEL_ID = 'amazon.titan-embed-text-v1'[source]¶
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.CLAUDE_MODEL_ID = 'anthropic.claude-3-5-sonnet-20241022-v2:0'[source]¶
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.DAG_ID = 'example_bedrock_knowledge_base'[source]¶
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.external_sources_rag_group()[source]¶
External Sources were added in boto 1.34.90, skip this operator if the version is below that.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.create_opensearch_policies(bedrock_role_arn, collection_name, policy_name_suffix)[source]¶
Create security, network and data access policies within Amazon OpenSearch Serverless.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.create_collection(collection_name)[source]¶
Call the Amazon OpenSearch Serverless API and create a collection with the provided name.
- Parameters:
collection_name (str) – The name of the Collection to create.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.create_vector_index(index_name, collection_id, region)[source]¶
Use the OpenSearchPy client to create the vector index for the Amazon Open Search Serverless Collection.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.copy_data_to_s3(bucket)[source]¶
Download some sample data and upload it to 3S.
- Parameters:
bucket (str) – Name of the Amazon S3 bucket to send the data to.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.get_collection_arn(collection_id)[source]¶
Return a collection ARN for a given collection ID.
- Parameters:
collection_id (str) – ID of the collection to be indexed.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.delete_data_source(knowledge_base_id, data_source_id)[source]¶
Delete the Amazon Bedrock data source created earlier.
See also
For more information on how to use this sensor, take a look at the guide: Delete an Amazon Bedrock Data Source
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.delete_knowledge_base(knowledge_base_id)[source]¶
Delete the Amazon Bedrock knowledge base created earlier.
See also
For more information on how to use this sensor, take a look at the guide: Delete an Amazon Bedrock Knowledge Base
- Parameters:
knowledge_base_id (str) – The unique identifier of the knowledge base to delete.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.delete_vector_index(index_name, collection_id)[source]¶
Delete the vector index created earlier.
- tests.system.amazon.aws.example_bedrock_retrieve_and_generate.delete_collection(collection_id)[source]¶
Delete the OpenSearch collection created earlier.
- Parameters:
collection_id (str) – ID of the collection to be indexed.