[Enhancement]: Add Amazon Nova Converse API example for Go SDK v2 (bedrock-runtime)

Open
#7,812 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 2 days

@rlhagerm is already working on this.

Since Apr 20, 2026.

Assessment

This issue has not been assessed yet.

Description

New example request
Background story

Hello, AWS team. 👋🏻

Currently, the Go SDK v2 gov2/bedrock-runtime only includes a converse api example for claude. Adding the Amazon Nova example will bring Go into parity with the other SDKs and make it much easier for devs to start building with Amazon Nova.

What does this example accomplish?

I would like to provide a PR demonstrating amazon.nova-lite-v1:0 via Bedrock's converse API using the Go v2 SDK, and return the model's text response. The update includes the core action method, unit tests, scenario integration, and metadata.

Which AWS service(s)?

AWS bedrock runtime - Converse API.

Which AWS SDKs or tools?
  • All languages
  • .NET
  • C++
  • Go (v2)
  • Java
  • Java (v2)
  • JavaScript
  • JavaScript (v3)
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Rust
  • Swift
  • Not applicable
Are there existing code examples to leverage?

sources and samples:

Do you have any reference code?
func (wrapper ConverseWrapper) ConverseNova(ctx context.Context, prompt string) (string, error) {  
    var content = types.ContentBlockMemberText{  
        Value: prompt,  
    }  
    var message = types.Message{  
        Content: []types.ContentBlock{&content},  
        Role:    "user",  
    }  
    modelId := "amazon.nova-lite-v1:0"  
    var converseInput = bedrockruntime.ConverseInput{  
        ModelId:  aws.String(modelId),  
        Messages: []types.Message{message},  
    }  
    response, err := wrapper.BedrockRuntimeClient.Converse(ctx, &converseInput)  
    if err != nil {  
        ProcessError(err, modelId)  
    }  
  
    responseText, _ := response.Output.(*types.ConverseOutputMemberMessage)  
    responseContentBlock := responseText.Value.Content[0]  
    text, _ := responseContentBlock.(*types.ContentBlockMemberText)  
    return text.Value, nil  
}
Dominant language
Java
Stars
10.5k
Forks
5.8k
Avg merge
2d 21h
Merged PRs (30d)
30

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from awsdocs/aws-doc-sdk-examples

All issues in awsdocs/aws-doc-sdk-examples

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.