Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add bedrock api arn params #514

Merged
merged 2 commits into from
Jan 20, 2025
Merged

feat: add bedrock api arn params #514

merged 2 commits into from
Jan 20, 2025

Conversation

NingLu
Copy link
Collaborator

@NingLu NingLu commented Jan 20, 2025

Fixes #

🤖 AI-Generated PR Description (Powered by Amazon Bedrock)

Description

This pull request includes modifications to various files related to the infrastructure, configuration, and job execution components of the project. The changes aim to enhance the existing functionality and address potential issues.

The modifications include updates to the configuration files (config.ts, magic-config.ts), knowledge base stack (knowledge-base-stack.ts), shared types (types.ts), and the Glue job script (glue-job-script.py). Additionally, there are updates to the shell script (build_whl.sh) and Python module (sm_utils.py) used in the Lambda job execution.

One notable change is the error reported for the llm_bot_dep-0.1.0-py3-none-any.whl file, which may require further investigation and resolution.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

File Stats Summary

File number involved in this PR: 7, unfold to see the details:

The file changes summary is as follows:

Files
Changes
Change Summary
source/infrastructure/lib/shared/types.ts 1 added, 0 removed The code change adds a new property 'crossAccountBedrockKey' to the 'chat' object in the SystemConfig interface.
source/infrastructure/bin/config.ts 1 added, 0 removed The code changes enable cross-account access for the Bedrock service and introduce a new configuration option for the Bedrock cross-account key.
source/infrastructure/lib/knowledge-base/knowledge-base-stack.ts 1 added, 0 removed The code change adds a new environment variable --CROSS_ACCOUNT_BEDROCK_KEY to the KnowledgeBaseStack, which is likely used for cross-account access to Bedrock resources.
source/lambda/job/build_whl.sh 1 added, 1 removed This change updates the command to use Python 3 instead of Python 2 when building a wheel distribution for a Python package.
source/infrastructure/cli/magic-config.ts 17 added, 0 removed The code changes add an option to provide a cross-account Bedrock API key ARN from AWS Secrets Manager for enabling cross-account Bedrock functionality in the chat feature.
source/lambda/job/glue-job-script.py 4 added, 0 removed The code changes add a new environment variable "CROSS_ACCOUNT_BEDROCK_KEY" to store the ARN of a cross-account Bedrock API key, which is then used in the main function for vector search operations.
source/lambda/job/dep/llm_bot_dep/sm_utils.py 31 added, 1 removed The code changes include importing the os module and the ClientError exception from botocore.exceptions, setting up an AWS session and secret manager client, adding a function get_secret_value to retrieve secret values from AWS Secrets Manager, and adding an optional parameter bedrock_api_key_arn to the getCustomEmbeddings function.

@NingLu NingLu requested a review from 11zhouxuan January 20, 2025 05:54
@11zhouxuan 11zhouxuan merged commit 861d650 into dev Jan 20, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants