Skip to content

Commit 82ad185

Browse files
authored
Fix Firebase AI StackOverflow (#6972)
See #6971
1 parent 9c00477 commit 82ad185

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

firebase-ai/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22

3+
* [fixed] Fixed `FirebaseAI.getInstance` StackOverflowException (#6971)
34
* [fixed] Fixed an issue that was causing the SDK to send empty `FunctionDeclaration` descriptions to the API.
45

56
# 16.0.0

firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,9 @@ internal constructor(
220220
}
221221

222222
/** The [FirebaseAI] instance for the provided [FirebaseApp] using the Google AI Backend. */
223-
@JvmStatic public fun getInstance(app: FirebaseApp): FirebaseAI = getInstance(app)
223+
@JvmStatic
224+
public fun getInstance(app: FirebaseApp): FirebaseAI =
225+
getInstance(app, GenerativeBackend.googleAI())
224226

225227
private const val GEMINI_MODEL_NAME_PREFIX = "gemini-"
226228

0 commit comments

Comments
 (0)