tests.system.providers.amazon.aws.example_bedrock_retrieve_and_generate
¶
Module Contents¶
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. |
Attributes¶
- tests.system.providers.amazon.aws.example_bedrock_retrieve_and_generate.CLAUDE_MODEL_ID = 'anthropic.claude-v2'[source]¶
- tests.system.providers.amazon.aws.example_bedrock_retrieve_and_generate.TITAN_MODEL_ID = 'amazon.titan-embed-text-v1'[source]¶
- tests.system.providers.amazon.aws.example_bedrock_retrieve_and_generate.ROLE_ARN_KEY = 'ROLE_ARN'[source]¶
- tests.system.providers.amazon.aws.example_bedrock_retrieve_and_generate.sys_test_context_task[source]¶
- tests.system.providers.amazon.aws.example_bedrock_retrieve_and_generate.DAG_ID = 'example_bedrock_knowledge_base'[source]¶
- tests.system.providers.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.providers.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.providers.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.providers.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.providers.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.providers.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.providers.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.providers.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.providers.amazon.aws.example_bedrock_retrieve_and_generate.delete_vector_index(index_name, collection_id)[source]¶
Delete the vector index created earlier.
- tests.system.providers.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.