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

Any plan to add AWS Bedrock suppport? #100

Open
tomdzh opened this issue Oct 16, 2024 · 2 comments
Open

Any plan to add AWS Bedrock suppport? #100

tomdzh opened this issue Oct 16, 2024 · 2 comments

Comments

@tomdzh
Copy link

tomdzh commented Oct 16, 2024

As the title describes, is there any plan to support AWS Bedrock models?

@Eladlev
Copy link
Owner

Eladlev commented Oct 17, 2024

Since we are using langchain, adding bedrock support is very simple:

  1. pip install langchain_aws
  2. Go to this function and add the following code:
elif config['type'].lower() == 'bedrock':
    from langchain_aws import ChatBedrock
    llm = ChatBedrock(
        model_id=config['name'],
        model_kwargs=dict(temperature=temperature),
    )
   return llm

In case you are using anthropic you should also add llm = AnthropicFunctions(llm=llm)
3. In the config_default.yml file, at each relevant definition of llm (when you want to change bedrock) you should change type: 'bedrock' and the name to the relevant model name.
4. If you are not using anthropic, as the meta-prompt (not recommended), you should also change:

meta_prompts:
    folder: 'prompts/meta_prompts_classification'

to:

meta_prompts:
    folder: 'prompts/meta_prompts_completion'

When I'll have access to bedrock, I'll upload a PR that adds it to the main code, meanwhile, if someone can verify that it's working and upload a PR it could be great.

@tomdzh
Copy link
Author

tomdzh commented Oct 17, 2024

Thanks, I will check it out!

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

No branches or pull requests

2 participants