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

feat: bedrock #5

Open
wants to merge 6 commits into
base: feature/aws
Choose a base branch
from
Open

feat: bedrock #5

wants to merge 6 commits into from

Conversation

jmikedupont2
Copy link
Member

adding bedrock to the aws branch for now...
needs to be tested and rebased.

mike dupont added 4 commits January 10, 2025 10:01
 ["፧ Initializing Bedrock model."]

 ⛔ ERRORS
   Error in generateText:
   {}

 ⛔ ERRORS
   ERROR:
   {}
@ebaizel
Copy link

ebaizel commented Jan 10, 2025

Nice! Let me know when it's ready to be tested, happy to support.

@jmikedupont2
Copy link
Member Author

jmikedupont2 commented Jan 10, 2025 via email

first you need to accept the license etc from aws anthropic etc.

this works only in region us west, and still does not work 100%

the error is

 ["፧ Initializing Bedrock model."]

 ⛔ ERRORS
   Error in generateText:
   {"name":"ValidationException","$fault":"client","$metadata":{"httpStatusCode":400,"requestId":"30292ec9-a8b8-40f9-b904-ca56140bf25f","attempts":1,"totalRetryDelay":0}}

 ⛔ ERRORS
   ERROR:
   {"name":"ValidationException","$fault":"client","$metadata":{"httpStatusCode":400,"requestId":"30292ec9-a8b8-40f9-b904-ca56140bf25f","attempts":1,"totalRetryDelay":0}}

 ["፧ Retrying..."]
so i think that might be the parameters.

export AWS_REGION=us-west-2

you need to requst access to the models in aws. not all the models are available everywhere, using us-west-2

https://us-west-2.console.aws.amazon.com/bedrock/home?region=us-west-2#/modelaccess

list model
`aws bedrock list-foundation-models`

install aws cli new ```
  curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
  unzip awscliv2.zip
  sudo ./aws/install --bin-dir /usr/local/bin --install-dir /usr/local/aws-cli --update
```

```
eval $(/usr/local/aws-cli/v2/current/bin/aws configure export-credentials --profile default --format env)
```
@jmikedupont2
Copy link
Member Author

With this new version it is accessing the model after you accept the terms

it is getting a 400 error on the request but we can fix that,
it needs region usw2, see readme.
more work is needed.

@jmikedupont2 jmikedupont2 changed the title Feat: bedrock feat: bedrock Jan 10, 2025
@jmikedupont2
Copy link
Member Author

now to add the embeddings model, removing local embeddings for now.

@jmikedupont2
Copy link
Member Author

Nice! Let me know when it's ready to be tested, happy to support.

I am going to use the proxy api instead of porting this right now.
like this https://github.com/hustshawn/bedrock-proxy-api-for-azure-openai

@ebaizel
Copy link

ebaizel commented Jan 13, 2025

Is Eliza built on the OpenAI APIs/SDKs? Running an EKS cluster is a pretty heavy lift, and I don't know if we can expect every developer who wants to use Bedrock to have to run a cluster.

@jmikedupont2
Copy link
Member Author

i will have a lightweight proxy server that runs locally
that was just an example look at this one

https://github.com/jparkerweb/bedrock-wrapper here is another option in node
https://github.com/jparkerweb/bedrock-proxy-endpoint

@jmikedupont2
Copy link
Member Author

jmikedupont2 commented Jan 13, 2025

currently the patched code I wrote needs to work on the embeddings,
and we can continue on that if needed.
but I hear gemini2 is the best free model so i an going to try the proxy route first https://github.com/google-gemini/proxy-to-gemini

@ebaizel
Copy link

ebaizel commented Jan 13, 2025

have you seen litellm?

@jmikedupont2
Copy link
Member Author

jmikedupont2 commented Jan 13, 2025 via email

Copy link

@ebaizel ebaizel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey, are you still planning to incorporate Bedrock? i wasn't clear from your comments about testing out google and use openai api.

the approach you have here aligns with how google was added as a provider

@jmikedupont2
Copy link
Member Author

jmikedupont2 commented Jan 14, 2025 via email

@jmikedupont2
Copy link
Member Author

I cannot work on two tasks with such complexity at once, this is going to have to wait, i tried to start the debugger but i need to learn to debug this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants