Skip to content

Commit 6fad595

Browse files
committed
First attempt at supporting the test
1 parent 4e98e90 commit 6fad595

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

firebase-ai/src/test/java/com/google/firebase/ai/DevAPIUnarySnapshotTests.kt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,4 +116,20 @@ internal class DevAPIUnarySnapshotTests {
116116
groundingMetadata.groundingChunks.forEach { it.web.shouldBeNull() }
117117
}
118118
}
119+
120+
@Test
121+
fun `thinking function call and though signtaure`() =
122+
goldenDevAPIUnaryFile("unary-success-thinking-function-call-thought-summary-signature.json") {
123+
withTimeout(testTimeout) {
124+
val response = model.generateContent("prompt")
125+
126+
response.candidates.isNotEmpty()
127+
response.thoughtSummary.shouldNotBeNull()
128+
response.thoughtSummary?.isNotEmpty()
129+
// There's no text in the response
130+
response.text.shouldBeNull()
131+
response.candidates.first().finishReason shouldBe FinishReason.STOP
132+
response.candidates.first().content.parts.isEmpty() shouldBe false
133+
}
134+
}
119135
}

0 commit comments

Comments
 (0)