Golang SDK support for Claude v3

0

Hi, I could not find any docs on messages API in Golang SDK - bedrockruntime. The native anthropic API requires API_KEY and I wish to work with AWS bedrock service to use it in Golang

Previously I was using v2.1 which had huge response times and I was eagerly waiting for v3 but seems like I can't directly switch to it.

Do we have any expected timeline to introduce Claude v3 messages API into Golang SDK or should I look for invoking python/js sdk through my golang codebase?

Arvi
asked a month ago723 views
1 Answer
0

Hello.

I'm not very familiar with Go, but based on the documentation below, it looks like "bedrockruntime" can be used, so I thought I could use it just by sending a message API request.
https://docs.aws.amazon.com/code-library/latest/ug/go_2_bedrock-runtime_code_examples.html
https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/gov2/bedrock-runtime/hello/hello.go#L4
https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/bedrockruntime#Client.InvokeModel

Please check the contents of the following document for message API requests.
https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-anthropic-claude-messages.html

This is a Japanese blog, but there is a blog that uses Amazon Bedrock's Claude v3 with Go SDK.
https://qiita.com/orc_jj/items/4877cb48b6e966c89788

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • Thank you for the response Riku,

    Problem here is messages API is not yet supported by Golang SDK unlike JS/Python SDK. The InvokeInference API doesn't support claude v3 model unlike claude v2 and v2.1.

    The messages API from anthropic API is available but it requires Anthropic's API_KEY and has separate billing on it, as I want to use my AWS creds for inferance, I was waiting for native SDK support in Golang.

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