Go, Machine Learning, AWS, Programming, Cloud.
complete code here. A streaming based implementation is a bit more involved. First off, we use InvokeModelWithResponseStream (instead of Invoke). output, err := brc.InvokeModelWithResponseStream(context.Background(), &bedrockruntime.InvokeModelWithResponseStreamInput{ Body: payloadBytes, ModelId: