bedrock demo
#2304
Replies: 1 comment
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
response, err := srv.client.InvokeModelWithResponseStream(ctx, &requestBody)
if err != nil {
return err
}
for {
event := <-response.GetStream().Events()
if event == nil {
return nil
}
if response.GetStream().Err() != nil {
return response.GetStream().Err()
}
// type switches can be used to check the union value
switch v := event.(type) {
case *types2.ResponseStreamMemberChunk:
resp := invokeRespBody(v.Value.Bytes)
Beta Was this translation helpful? Give feedback.
All reactions