File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Example.swiftpm/ViewModel Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ import AnthropicSwiftSDK
51
51
let result = try await messageHandler. createBatches ( batches: [ batch] )
52
52
let stream = try await messageHandler. results ( streamOf: result. id)
53
53
for try await chunk in stream {
54
- guard case . text( let text) = chunk. result? . message? . content. first else {
54
+ guard case . text( let text, _ ) = chunk. result? . message? . content. first else {
55
55
return
56
56
}
57
57
messages. append ( . init( user: . assistant, text: text) )
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ import AnthropicSwiftSDK
54
54
toolChoice: . auto
55
55
)
56
56
57
- if case let . text( reply) = result. content. first {
57
+ if case let . text( reply, _ ) = result. content. first {
58
58
messages. append ( . init( user: . assistant, text: reply) )
59
59
}
60
60
isLoading = false
You can’t perform that action at this time.
0 commit comments