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

[Bug Fix] Add support for AWS_REGION override #1237

Merged
merged 2 commits into from
Feb 6, 2024
Merged

[Bug Fix] Add support for AWS_REGION override #1237

merged 2 commits into from
Feb 6, 2024

Conversation

thomasgtaylor
Copy link
Contributor

Description

When I used the AWS Bedrock LLM configuration in my article, I got a model access error because the region is hardcoded to us-west-2 in the source.

AWS_REGION is a widely-accepted environment variable for AWS credentials.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • Documentation update

How Has This Been Tested?

  • Test Script (please provide)

I ran the following script:

from embedchain import App

bot = App.from_config(config_path="config.yaml")

bot.add("https://en.wikipedia.org/wiki/Ada_Lovelace")

print(bot.query("Who is Ada Lovelace?"))

with my AWS_REGION environment variable exported and an AWS profile set.

Here is the configuration:

llm:
  provider: aws_bedrock
  config:
    model: anthropic.claude-v2
    model_kwargs:
      temperature: 0.5
      top_p: 1
      top_k: 250
      max_tokens_to_sample: 200

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

Maintainer Checklist

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Made sure Checks passed

@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Feb 3, 2024
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Feb 6, 2024
@deshraj
Copy link
Collaborator

deshraj commented Feb 6, 2024

Nice, thanks for adding support for this.

@deshraj deshraj merged commit 8fe2c3e into mem0ai:main Feb 6, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants