-
Notifications
You must be signed in to change notification settings - Fork 35
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
aws_bedrock_runtime:invoke_model not working #161
Comments
Hi @hedleym 👋 Are you able to patch aws_bedrock_runtime.erl#L1168 temporarily and set it to I'm unable to debug this myself as I currently don't have access to The error you're seeing is not in My suspicion is some header is missing (most likely) or some encoding is wrong somewhere (unlikely). I can't see any issues with the encoding so my guess is that a header (the aforementioned |
I found the issue I was having. For the bedrock apis, the ModelId values typically have a ':' in the string, and this string is used to build the path. The path is URI encoded, which results in a '%" appearing in the encoded path, and then during the aws_signature:sign_v4 operation, it is expected that the uri_encode_path is true., which will further encode the % sign. To work around this in my fork of aws_erlang, I expose the Options in an aws_request:sign_request/6 function, and set the uri_encode_path to true in the aws_bedrock_* calls to aws_request:sign_request/6. |
Should be available in a few minutes on: https://hex.pm/packages/aws_erlang/1.0.10 |
@onno-vos-dev, I believe so, although I am only testing bedrock-runtime and bedrock at the moment.
…________________________________
From: Onno Vos ***@***.***>
Sent: Monday, January 27, 2025 1:27 AM
To: aws-beam/aws-erlang ***@***.***>
Cc: Mark Hedley ***@***.***>; Mention ***@***.***>
Subject: Re: [aws-beam/aws-erlang] aws_bedrock_runtime:invoke_model not working (Issue #161)
@hedleym</~https://github.com/hedleym> I assume this goes for all aws_bedrock_* modules right?
—
Reply to this email directly, view it on GitHub<#161 (comment)>, or unsubscribe</~https://github.com/notifications/unsubscribe-auth/ABWF6XZDGJPF4N6MYYNIYF32MXGWBAVCNFSM6AAAAABVPHBC76VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJUHEZTQMZVHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Hello:
When I make the following call (using version aws─1.0.7+build.995.refd16d091 on OTP27.2):
Where:
and
AWS responds with:
If I make the same request using the aws_cli, the query works (same credentials as above):
The text was updated successfully, but these errors were encountered: