Skip to content

Add support for AWS Bedrock LLM integration #9

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

onyedikachi-david
Copy link

@onyedikachi-david onyedikachi-david commented May 9, 2025

WIP

Still a work in progress, while, trying to figure out where this clippy error is coming from, i would appreciate some insights @vigoo, Thank you:

    Checking golem-llm v0.0.0 (/Users/onyedikachi/Documents/codes/algora-bounties/golem-llm/llm)
error: the `Err`-variant returned from this function is very large
  --> llm/src/event_source/mod.rs:37:39
   |
37 |     pub fn new(response: Response) -> Result<Self, Error> {
   |                                       ^^^^^^^^^^^^^^^^^^^
   |
  ::: llm/src/event_source/error.rs:42:5
   |
42 |     InvalidContentType(HeaderValue, Response),
   |     ----------------------------------------- the largest variant contains at least 288 bytes
...
45 |     InvalidStatusCode(StatusCode, Response),
   |     --------------------------------------- the variant `InvalidStatusCode` contains at least 250 bytes
   |
   = help: try reducing the size of `event_source::error::Error`, for example by boxing large elements or replacing it with `Box<event_source::error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err
   = note: `-D clippy::result-large-err` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::result_large_err)]`

error: the `Err`-variant returned from this function is very large
  --> llm/src/event_source/mod.rs:97:42
   |
97 | fn check_response(response: Response) -> Result<Response, Error> {
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^
   |
  ::: llm/src/event_source/error.rs:42:5
   |
42 |     InvalidContentType(HeaderValue, Response),
   |     ----------------------------------------- the largest variant contains at least 288 bytes
...
45 |     InvalidStatusCode(StatusCode, Response),
   |     --------------------------------------- the variant `InvalidStatusCode` contains at least 250 bytes
   |
   = help: try reducing the size of `event_source::error::Error`, for example by boxing large elements or replacing it with `Box<event_source::error::Error>`
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#result_large_err

error: could not compile `golem-llm` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `golem-llm` (lib test) due to 2 previous errors
Error while executing command, exit code: 101
  • Introduced golem-llm-bedrock component with necessary dependencies and configurations.
  • Updated Cargo.toml and Makefile.toml to include new build tasks for Bedrock.
  • Enhanced README.md to document the new Bedrock LLM implementation.
  • Implemented client and conversion logic for interacting with AWS Bedrock APIs.
  • Added streaming support and message conversion for Bedrock models.
  • Updated test configurations to include Bedrock component builds.

Fixes: #2
/claim #2

- Introduced `golem-llm-bedrock` component with necessary dependencies and configurations.
- Updated `Cargo.toml` and `Makefile.toml` to include new build tasks for Bedrock.
- Enhanced `README.md` to document the new Bedrock LLM implementation.
- Implemented client and conversion logic for interacting with AWS Bedrock APIs.
- Added streaming support and message conversion for Bedrock models.
- Updated test configurations to include Bedrock component builds.

Signed-off-by: David Anyatonwu <davidanyatonwu@gmail.com>
Signed-off-by: David Anyatonwu <davidanyatonwu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add AWS Bedrock Provider
1 participant