File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Examples/text_chat/Sources Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,8 @@ struct TextChat {
6868 . withPrompt ( prompt)
6969 } else {
7070 // append the new prompt to the existing request
71- // ConverseRequestBuilder is stateles, it doesn't keep track of the history
71+ // ConverseRequestBuilder is stateless, it doesn't keep track of the history
72+ // thanks to the `if` above, we're sure `request` is not nil
7273 request = try ConverseRequestBuilder ( from: request!)
7374 . withHistory ( history)
7475 . withPrompt ( prompt)
@@ -77,7 +78,7 @@ struct TextChat {
7778 // keep track of the history of the conversation
7879 history. append ( Message ( prompt) )
7980
80- // send the request
81+ // send the request. We are sure `request` is not nil
8182 let reply = try await bedrock. converseStream ( with: request!)
8283
8384 for try await element in reply. stream {
You can’t perform that action at this time.
0 commit comments