Skip to content

Commit

Permalink
use env var to set aws region
Browse files Browse the repository at this point in the history
  • Loading branch information
ksolo committed Aug 27, 2024
1 parent 75120e9 commit ba56514
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
ANTHROPIC_API_KEY=""
AWS_ACCESS_KEY_ID=""
AWS_REGION_NAME=""
AWS_SECRET_ACCESS_KEY=""
FIREWORKS_API_KEY=""
GROQ_API_KEY=""
MISTRAL_API_KEY=""
Expand All @@ -7,5 +10,3 @@ OLLAMA_API_URL="http://localhost:11434"
REPLICATE_API_KEY=""
TOGETHER_API_KEY=""
OCTO_API_KEY=""
AWS_ACCESS_KEY_ID=""
AWS_SECRET_ACCESS_KEY=""
2 changes: 1 addition & 1 deletion aimodels/providers/aws_bedrock_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(self):

self.aws_bedrock_client = boto3.client(
service_name="bedrock-runtime",
region_name="us-west-2",
region_name=os.getenv("AWS_REGION_NAME"),
aws_access_key_id=os.getenv("AWS_ACCESS_KEY_ID"),
aws_secret_access_key=os.getenv("AWS_SECRET_ACCESS_KEY"),
)
Expand Down

0 comments on commit ba56514

Please sign in to comment.