-
-
Save awsvpc/1d10305aa6835a0f43c36dce2cd8eb9a to your computer and use it in GitHub Desktop.
BedrockService
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BedrockService: | |
| def __init__(self): | |
| # Model and AWS region configuration | |
| self.model_id = os.environ.get('BEDROCK_MODEL_ID', 'us.anthropic.claude-3-7-sonnet-20250219-v1:0') | |
| self.aws_region = os.environ.get('AWS_REGION', 'us-east-1') | |
| # Database configuration | |
| self.db_config = { | |
| 'host': os.environ.get('DB_HOST', ''), | |
| 'user': os.environ.get('DB_USER', ''), | |
| 'password': os.environ.get('DB_PASSWORD', ''), | |
| 'db': os.environ.get('DB_NAME', ''), | |
| 'port': int(os.environ.get('DB_PORT', 3306)) | |
| } | |
| # Initialize connections | |
| self.initialize_db_connection() |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
bedrck