Skip to content

Commit c1ddd99

Browse files
authored
Merge d3c70e6 into 197b090
2 parents 197b090 + d3c70e6 commit c1ddd99

File tree

3 files changed

+3
-14
lines changed

3 files changed

+3
-14
lines changed

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -57,24 +57,13 @@ internal class DevAPIUnarySnapshotTests {
5757
}
5858
}
5959

60-
@Test
61-
fun `prompt blocked for safety`() =
62-
goldenDevAPIUnaryFile("unary-failure-prompt-blocked-safety.txt") {
63-
withTimeout(testTimeout) {
64-
shouldThrow<ResponseStoppedException> { model.generateContent("prompt") } should
65-
{
66-
it.response.candidates[0].finishReason shouldBe FinishReason.MAX_TOKENS
67-
}
68-
}
69-
}
70-
7160
@Test
7261
fun `response blocked for safety`() =
7362
goldenDevAPIUnaryFile("unary-failure-finish-reason-safety.txt") {
7463
withTimeout(testTimeout) {
7564
shouldThrow<ResponseStoppedException> { model.generateContent("prompt") } should
7665
{
77-
it.response.candidates[0].finishReason shouldBe FinishReason.MAX_TOKENS
66+
it.response.candidates[0].finishReason shouldBe FinishReason.SAFETY
7867
}
7968
}
8069
}

firebase-ai/src/test/java/com/google/firebase/ai/util/tests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ internal fun goldenDevAPIUnaryFile(
248248
name: String,
249249
httpStatusCode: HttpStatusCode = HttpStatusCode.OK,
250250
block: CommonTest,
251-
) = goldenUnaryFile("developerapi/$name", httpStatusCode, GenerativeBackend.googleAI(), block)
251+
) = goldenUnaryFile("googleai/$name", httpStatusCode, GenerativeBackend.googleAI(), block)
252252

253253
/**
254254
* Loads a *Golden File* from the resource directory.

firebase-ai/update_responses.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# This script replaces mock response files for Vertex AI unit tests with a fresh
1818
# clone of the shared repository of Vertex AI test data.
1919

20-
RESPONSES_VERSION='v7.*' # The major version of mock responses to use
20+
RESPONSES_VERSION='v10.*' # The major version of mock responses to use
2121
REPO_NAME="vertexai-sdk-test-data"
2222
REPO_LINK="https://github.com/FirebaseExtended/$REPO_NAME.git"
2323

0 commit comments

Comments
 (0)