-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Added AmazonBedrockVectorizer class #1151
base: main
Are you sure you want to change the base?
Conversation
There was no SentenceVectorizer that leveraged Amazon Bedrock. I've created one.
|
||
# Initialize the Bedrock client | ||
self.bedrock_client = boto3.client( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this potentially be replaced with the existing DSPy AWS model integrations? would be neat to tie it in!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure what you would like to see here to be honest 🤔
dsp/modules/sentence_vectorizer.py
Outdated
}) | ||
else: | ||
raise Exception("How did you even get here?") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would appreciate a more informative exception message :).
dsp/modules/sentence_vectorizer.py
Outdated
@@ -1,6 +1,6 @@ | |||
import abc | |||
from typing import List, Optional | |||
|
|||
import boto3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update with try/except block like in aws_providers.
Thanks @dgallitelli for the PR! left a few comments with the main change required in wrapping the Also, please run |
See PR#1151 on DSPy
Thanks @arnavsinghvi11 for your comments! I've addressed the wrapping of
This makes me think that all is good so far. I'm not sure your point about the existing DSPy AWS model integrations. What would you be looking for here? A new |
Thanks @dgallitelli . Yes I was curious if the boto3 client could be switched to use the supported DSPy AWS providers. Would be a seamless way to tie in the DSPy library together. |
There was no SentenceVectorizer that leveraged Amazon Bedrock. I've created one.