Skip to content

Commit cc092e3

Browse files
committed
Address review comments
1 parent 8d6e0cb commit cc092e3

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

FirebaseAI/Sources/Extensions/Internal/GenerationSchema+Gemini.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,11 @@ extension FirebaseAI.GenerationSchema {
4040
#endif // canImport(FoundationModels)
4141

4242
// TODO: Implement FirebaseAI.GenerationSchema encoding for for iOS < 26.
43-
assertionFailure("TODO: \(Self.self).#\(#function) not yet implemented for iOS < 26.")
44-
return [:]
43+
throw GenerativeModelSession.GenerationError.decodingFailure(
44+
GenerativeModelSession.GenerationError.Context(debugDescription: """
45+
\(Self.self).#\(#function): `GenerationSchema` encoding is not yet implemented for iOS < 26.
46+
""")
47+
)
4548
}
4649

4750
private struct SchemaCodingKey: CodingKey {

FirebaseAI/Tests/TestApp/Tests/Integration/GenerativeModelSessionTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@
254254
#expect(isComplete, "The stream finished, but the final snapshot was not marked as complete.")
255255

256256
let response = try await stream.collect()
257-
print(response.rawContent.isComplete)
258257
let content = response.content
259258
#expect(!content.isEmpty)
260259
#expect(response.rawContent.isComplete, "The final response was not marked as complete.")

0 commit comments

Comments
 (0)