You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// see https://github.com/awslabs/aws-sdk-swift/blob/2697fb44f607b9c43ad0ce5ca79867d8d6c545c2/Sources/Services/AWSBedrockRuntime/Sources/AWSBedrockRuntime/Models.swift#L3478
120
121
// it will be the responsibility of the user to handle the stream and re-assemble the messages and content
121
-
// TODO: should we expose the SDK ConverseStreamOutput from the SDK ? or wrap it (what's the added value) ?
122
122
123
-
letreply=ConverseReplyStream(sdkStream)
123
+
letreply=tryConverseReplyStream(sdkStream)
124
124
125
125
// this time, a different stream is created from the previous one, this one has the following elements
126
-
// - content segment: this contains a ContentSegment, an enum which can be a .text(Int, String),
127
-
// the integer is the id for the content block that the content segment is a part of,
128
-
// the String is the part of text that is send from the model.
129
-
// - content block complete: this includes the id of the completed content block and the complete content block itself
126
+
// - messageStart: this is the start of a message, it contains the role (assistant or user)
127
+
// - text: this is a delta of the text content, it contains the partial text
128
+
// - reasoning: this is a delta of the reasoning content, it contains the partial reasoning text
129
+
// - toolUse: this is a buffered tool use response, it contains the tool name and id, and the input parameters
130
130
// - message complete: this includes the complete Message, ready to be added to the history and used for future requests
131
+
// - metaData: this is the metadata about the response, it contains statitics about the response, such as the number of tokens used and the latency
0 commit comments