feat(aws/bedrock): add BedrockAdapter implementing LlmProvider#127
Open
Sandipmandal25 wants to merge 1 commit intoc2siorg:mainfrom
Open
feat(aws/bedrock): add BedrockAdapter implementing LlmProvider#127Sandipmandal25 wants to merge 1 commit intoc2siorg:mainfrom
Sandipmandal25 wants to merge 1 commit intoc2siorg:mainfrom
Conversation
|
Thanks for the clarification about discussing the approach with mentor. Good to see the Bedrock implementation completed in #127. For context, my PR #125 also implements Bedrock with a few additional features worth considering:
Happy to close #125 if maintainers prefer #127's approach, or we can discuss which implementation best fits the project architecture. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
BedrockAdapter, a complete AWS Bedrock implementation of theLlmProvidertrait usingaws-sdk-bedrockruntime.Changes
Introduced
BedrockAdapterimplementing all fourLlmProvidermethodsgenerateviaconverse()streamviaconverse_stream()LlmStreamEventembedviainvoke_model()amazon.titan-embed-text-v2:0, 1024 dimensions)generate_with_toolsviaconverse()withToolConfigurationToolCallResponse::ToolCallorToolCallResponse::TextAdded helper utilities:
json_to_document/document_to_jsonforaws_smithy_types::DocumentconversionSafety :
.max(0) as u32.min(i32::MAX as u32) as i32LlmStreamEvent::Errorinstead of being silently droppedTesting
All integration tests pass against the live AWS Bedrock API:
amazon.nova-micro-v1:0us-east-1References