-
-
Save 4l3j4ndr0/f4958102b37d93e4fe62c10859f378f9 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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment