File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,7 @@ public final class GenerativeModel: Sendable {
175
175
}
176
176
177
177
// If all candidates are empty (contain no information that a developer could act on) then throw
178
- if response. candidates. allSatisfy { $0. isEmpty } {
178
+ if response. candidates. allSatisfy ( { $0. isEmpty } ) {
179
179
throw GenerateContentError . internalError ( underlying: InvalidCandidateError . emptyContent (
180
180
underlyingError: Candidate . EmptyContentError ( )
181
181
) )
@@ -246,7 +246,7 @@ public final class GenerativeModel: Sendable {
246
246
247
247
// Skip returning the response if all candidates are empty (i.e., they contain no
248
248
// information that a developer could act on).
249
- if response . candidates . allSatisfy { $0. isEmpty } {
249
+ if response. candidates. allSatisfy ( { $0. isEmpty } ) {
250
250
AILog . log (
251
251
level: . debug,
252
252
code: . generateContentResponseNoCandidates,
You can’t perform that action at this time.
0 commit comments