-
-
Notifications
You must be signed in to change notification settings - Fork 724
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
Support for aws bedrock using boto3 #1287
base: main
Are you sure you want to change the base?
Conversation
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.
👍 Looks good to me! Reviewed everything up to 93e0c4b in 1 minute and 1 seconds
More details
- Looked at
824
lines of code in9
files - Skipped
0
files when reviewing. - Skipped posting
8
drafted comments based on config settings.
1. instructor/client_bedrock.py:30
- Draft comment:
Remove print statements used for debugging. Use logging if necessary. - Reason this comment was not posted:
Confidence changes required:50%
The print statements used for debugging should be removed or replaced with proper logging.
2. instructor/client_bedrock.py:31
- Draft comment:
Remove print statements used for debugging. Use logging if necessary. - Reason this comment was not posted:
Confidence changes required:50%
The print statements used for debugging should be removed or replaced with proper logging.
3. instructor/function_calls.py:299
- Draft comment:
Remove print statements used for debugging. Use logging if necessary. - Reason this comment was not posted:
Confidence changes required:50%
The print statements used for debugging should be removed or replaced with proper logging.
4. instructor/patch.py:186
- Draft comment:
Remove print statements used for debugging. Use logging if necessary. - Reason this comment was not posted:
Confidence changes required:50%
The print statements used for debugging should be removed or replaced with proper logging.
5. instructor/process_response.py:749
- Draft comment:
Remove print statements used for debugging. Use logging if necessary. - Reason this comment was not posted:
Confidence changes required:50%
The print statements used for debugging should be removed or replaced with proper logging.
6. instructor/client_bedrock.py:43
- Draft comment:
Assertions should have clear and user-friendly error messages. Consider rephrasing the assertion error messages in thefrom_bedrock
function for better clarity. - Reason this comment was not posted:
Confidence changes required:80%
The assertion error messages infrom_bedrock
function inclient_bedrock.py
are not formatted well. They should be more descriptive and user-friendly.
7. instructor/client_bedrock.py:31
- Draft comment:
Avoid usingprint
statements for debugging in production code. Consider using a logging framework instead. - Reason this comment was not posted:
Confidence changes required:80%
Theprint
statements inhandle_bedrock_json
function inclient_bedrock.py
are not necessary for production code and should be removed or replaced with proper logging.
8. instructor/function_calls.py:299
- Draft comment:
Avoid usingprint
statements for debugging in production code. Consider using a logging framework instead. - Reason this comment was not posted:
Confidence changes required:80%
Theprint
statement inparse_bedrock_json
function infunction_calls.py
is not necessary for production code and should be removed or replaced with proper logging.
Workflow ID: wflow_EHi0ojlV6htlekmA
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Hi Please review this PR |
Hi @imZain448 thanks for submitting the PR, I'll get aws bedrock setup this week and will test this out. |
Add support for aws bedrock using boto3 so that it can be directly used using
from_bedrock
methodthis PR adds a new method
instructor.from_bedrock
which wraps around theclient.converse
provided by aws boto3 bedrock-runtime api .Important
Adds AWS Bedrock support using boto3 with new
from_bedrock
method and Bedrock-specific response handling.from_bedrock
method inclient_bedrock.py
to integrate with AWS Bedrock using boto3.BEDROCK_TOOLS
andBEDROCK_JSON
modes inMode
enum inmode.py
.parse_bedrock_json
infunction_calls.py
for JSON parsing specific to Bedrock.__init__.py
to conditionally importfrom_bedrock
if boto3 is available.Provider.BEDROCK
inutils.py
.handle_bedrock_json
andhandle_bedrock_tools
inprocess_response.py
for processing Bedrock responses.handle_response_model
inprocess_response.py
to include Bedrock modes.This description was created by
for 93e0c4b. It will automatically update as commits are pushed.