You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the signer on the new Bedrock API, I get an error back about the content type being incorrect. It's expecting "application/json" and it works with this type in Postman, but for some reason it isn't working with the signer.
Below is the code where I'm setting the type in the request's Content, like your example. But with the below code I get back: "message": "The provided Content Type is invalid or not supported for this model", which is the behaviour received in Postman when I change the type from json to something else, like text.
This may be a Bedrock issue, but wondering if this issue has been tracked before.
Thanks!
var signer = new AWS4RequestSigner(_titanAccessKey, _titanSecretKey);
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://bedrock.us-west-2.amazonaws.com/model/amazon.titan-tg1-large/invoke"),
Content = new StringContent(promptJson, Encoding.UTF8, "application/json")
};
request = await signer.Sign(request, "bedrock", "us-west-2");
var client = new HttpClient();
var response = await client.SendAsync(request);
var resultString = await response.Content.ReadAsStringAsync();
The text was updated successfully, but these errors were encountered:
Hey Y'all,
When I use the signer on the new Bedrock API, I get an error back about the content type being incorrect. It's expecting "application/json" and it works with this type in Postman, but for some reason it isn't working with the signer.
Below is the code where I'm setting the type in the request's Content, like your example. But with the below code I get back:
"message": "The provided Content Type is invalid or not supported for this model"
, which is the behaviour received in Postman when I change the type from json to something else, like text.This may be a Bedrock issue, but wondering if this issue has been tracked before.
Thanks!
The text was updated successfully, but these errors were encountered: