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

[ENH] - Add support for Amazon Bedrock #171

Closed
094459 opened this issue Nov 8, 2023 · 4 comments
Closed

[ENH] - Add support for Amazon Bedrock #171

094459 opened this issue Nov 8, 2023 · 4 comments
Labels
type: enhancement 💅 New feature or request

Comments

@094459
Copy link

094459 commented Nov 8, 2023

Feature description

I am looking to see how I can add support for Amazon Bedrock, but trying to figure out the process for adding new assistants. I am happy to give this a go myself, but at the moment, the code I have put together is not working, but i think that is because I am not sure how Ragna works with assistants.

Value and/or benefit

Open this up to users who are accessing some of these foundational models via Amazon Bedrock rather than the providers (e.g. Anthropic)

Anything else?

No response

@094459 094459 added the type: enhancement 💅 New feature or request label Nov 8, 2023
@pmeier
Copy link
Member

pmeier commented Nov 8, 2023

Hey @094459 and thanks for the request. Our general policy (we haven't written it down 🥲 ) is that we won't accept any components that require additional infrastructure to run. Packages installable from PyPI or secrets in the form of environment variables are fine.

That being said, we of course recognize the need for services that require additional infrastructure. This is why we build Ragna to be fully extensible. I acknowledge that it is abysmally documented right now. Just subclass SourceStorage and Assistant and implement whatever you like. As long as it adheres to the signatures of the abstract methods, it will work with Ragna.

For the Python API, you can pass your classes directly to the chat. Have a look at this notebook: https://github.com/Quansight/ragna/blob/main/examples/local_llm/local_llm.ipynb

For the REST API and UI, you need to add them to the source_storages = and assistants = list in the configuration. For example

[core]
# ...
source_storages = [
    "ragna.source_storages.RagnaDemoSourceStorage",
    "my_ragna_plugin.MySourceStorage",
]
assistants = [
    "ragna.assistants.RagnaDemoAssistant",
    "my_ragna_plugin.MyAssistant",
]

Make sure that that the my_ragna_plugin.py Python module is on the PYTHONPATH when starting the API / UI. Just as heads up: to meet the deadline, we hardcoded some assumptions about the source storages in the UI. This will be cleaned up for the next release, but might conflict with your custom classes for now.

@094459
Copy link
Author

094459 commented Nov 8, 2023

It is only the additional assistant I was looking to add, specifically Amazon Bedrock's Anthropic Claude v2. I will take a look at the info and see what I can figure out. Thanks for the response.

@094459
Copy link
Author

094459 commented Nov 8, 2023

#173

@pmeier
Copy link
Member

pmeier commented Nov 8, 2023

Closing this following the discussion in #173.

@pmeier pmeier closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement 💅 New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants