Bedrock .NET SDK not working and Opus not apparently supported

0

Hi, I'm trying to build against the .NET Bedrock SDK, and trying the code at https://docs.aws.amazon.com/sdk-for-net/v3/developer-guide/csharp_bedrock-runtime_code_examples.html for anthropic 3 models, and having a few issues

  1. When I call the streaming code in the InvokeClaudeWithResponseStreamAsync, when I get to the line yield return await buffer.Reader.ReadAsync(cancellationToken); it simply never returns
  2. When I call the non-streaming code in InvokeClaudeAsync I get an error Please use the Messages API instead. The only references I can find specifically for the Messages API are in Python and CLI
  3. When I try to call opus, I get told the model is not supported, which is confirmed when I call (AmazonBedrockClient).ListFoundationModelsAsync, however we can call it via Typescript BedrockRuntimeClient

Is this documentation out of date or incomplete, or am I doing something wrong?

Thanks

John C
asked 6 months ago406 views
3 Answers
0

As I stated in the question, I can access Opus on our account via Typescript or Python, just not the .NET SDK, which is what the question was asking.

Until the .NET SDK is working it's unusable to me on our NSB backend

John C
answered 5 months ago
0

Hello,

Thankyou for using AWS Bedrock !!

From the description I see that you are facing challenges while invoking Anthropic Claude 3 models using the .Net SDK. I would like to inform you that I was able to invoke the Anthropic Claude 3 models using the below AWS SDK examples :

[+] InvokeModel : https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/dotnetv3/Bedrock-runtime/Models/AnthropicClaude/InvokeModel/InvokeModel.cs#L4

[+] InvokeModelWithResponseStream : https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/dotnetv3/Bedrock-runtime/Models/AnthropicClaude/InvokeModelWithResponseStream/InvokeModelWithResponseStream.cs#L4

I also checked internally and I could not find any reported bug in the .Net SDK. I would recommend you to please try with the above method. In case you again face any issue, Please reach out to us via a support case with all the relevant details as your use-case might need a deeper investigation.

AWS
answered 3 months ago
-1

hi John,

Amazon Bedrock supports foundation models (FMs) from various providers including, Amazon, Anthropic, AI21 Labs, Cohere, Meta, Mistral, and Stability AI with more to come. You must request access to a model before you can use it.

Please confirm you've enabled the model from the AWS Console.

Ty
answered 5 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions