@@ -17,7 +17,7 @@ import (
1717)
1818
1919// ConverseScenario demonstrates how to use the Amazon Bedrock Runtime client
20- // to Converse with Anthropic Claude
20+ // to Converse with Anthropic Claude, Amazon Nova
2121type ConverseScenario struct {
2222 sdkConfig aws.Config
2323 questioner demotools.IQuestioner
@@ -56,6 +56,10 @@ func (scenario ConverseScenario) Run(ctx context.Context) {
5656 log .Printf ("Invoking Claude with prompt: %v\n " , text2textPrompt )
5757 scenario .ConverseClaude (ctx , text2textPrompt )
5858
59+ log .Println (strings .Repeat ("-" , 77 ))
60+ log .Printf ("Invoking Amazon Nova with prompt: %v\n " , text2textPrompt )
61+ scenario .ConverseNova (ctx , text2textPrompt )
62+
5963 log .Println (strings .Repeat ("=" , 77 ))
6064 log .Println ("Thanks for watching!" )
6165 log .Println (strings .Repeat ("=" , 77 ))
@@ -69,4 +73,12 @@ func (scenario ConverseScenario) ConverseClaude(ctx context.Context, prompt stri
6973 log .Printf ("\n Claude : %v\n " , strings .TrimSpace (completion ))
7074}
7175
76+ func (scenario ConverseScenario ) ConverseNova (ctx context.Context , prompt string ) {
77+ completion , err := scenario .converseWrapper .ConverseNova (ctx , prompt )
78+ if err != nil {
79+ panic (err )
80+ }
81+ log .Printf ("\n Amazon Nova: %v\n " , strings .TrimSpace (completion ))
82+ }
83+
7284// snippet-end:[gov2.bedrock-runtime.Scenario_Converse]
0 commit comments