Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use 1.5 instead of 1.0 in tests #206

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ internal class RequestFormatTests {
val controller =
APIController(
"super_cool_test_key",
"gemini-pro-1.0",
"gemini-pro-1.5",
RequestOptions(),
mockEngine,
"genai-android/${BuildConfig.VERSION_NAME}",
Expand All @@ -119,7 +119,7 @@ internal class RequestFormatTests {
val controller =
APIController(
"super_cool_test_key",
"gemini-pro-1.0",
"gemini-pro-1.5",
RequestOptions(endpoint = "https://my.custom.endpoint"),
mockEngine,
TEST_CLIENT_ID,
Expand All @@ -146,7 +146,7 @@ internal class RequestFormatTests {
val controller =
APIController(
"super_cool_test_key",
"gemini-pro-1.0",
"gemini-pro-1.5",
RequestOptions(),
mockEngine,
TEST_CLIENT_ID,
Expand All @@ -169,7 +169,7 @@ internal class RequestFormatTests {
val controller =
APIController(
"super_cool_test_key",
"gemini-pro-1.0",
"gemini-pro-1.5",
RequestOptions(),
mockEngine,
TEST_CLIENT_ID,
Expand Down Expand Up @@ -216,7 +216,7 @@ internal class RequestFormatTests {
val controller =
APIController(
"super_cool_test_key",
"gemini-pro-1.0",
"gemini-pro-1.5",
RequestOptions(),
mockEngine,
TEST_CLIENT_ID,
Expand Down Expand Up @@ -250,7 +250,7 @@ internal class RequestFormatTests {
val controller =
APIController(
"super_cool_test_key",
"gemini-pro-1.0",
"gemini-pro-1.5",
RequestOptions(),
mockEngine,
TEST_CLIENT_ID,
Expand All @@ -273,7 +273,7 @@ internal class RequestFormatTests {
val controller =
APIController(
"super_cool_test_key",
"gemini-pro-1.0",
"gemini-pro-1.5",
RequestOptions(),
mockEngine,
TEST_CLIENT_ID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ internal class GenerativeModelTests {

@Test
fun `generateContent request succeeds`() = doBlocking {
val model = GenerativeModel("gemini-pro-1.0", apiKey, controller = mockApiController)
val model = GenerativeModel("gemini-pro-1.5", apiKey, controller = mockApiController)
coEvery {
mockApiController.generateContent(
GenerateContentRequest_Common(
"gemini-pro-1.0",
"gemini-pro-1.5",
contents = listOf(Content_Common(parts = listOf(TextPart_Common("Why's the sky blue?")))),
)
)
Expand Down Expand Up @@ -135,11 +135,11 @@ internal class GenerativeModelTests {

@Test
fun `generateContent throws exception`() = doBlocking {
val model = GenerativeModel("gemini-pro-1.0", apiKey, controller = mockApiController)
val model = GenerativeModel("gemini-pro-1.5", apiKey, controller = mockApiController)
coEvery {
mockApiController.generateContent(
GenerateContentRequest_Common(
"gemini-pro-1.0",
"gemini-pro-1.5",
contents = listOf(Content_Common(parts = listOf(TextPart_Common("Why's the sky blue?")))),
)
)
Expand All @@ -150,11 +150,11 @@ internal class GenerativeModelTests {

@Test
fun `generateContentStream throws exception`() = doBlocking {
val model = GenerativeModel("gemini-pro-1.0", apiKey, controller = mockApiController)
val model = GenerativeModel("gemini-pro-1.5", apiKey, controller = mockApiController)
coEvery {
mockApiController.generateContentStream(
GenerateContentRequest_Common(
"gemini-pro-1.0",
"gemini-pro-1.5",
contents = listOf(Content_Common(parts = listOf(TextPart_Common("Why's the sky blue?")))),
)
)
Expand All @@ -180,7 +180,7 @@ internal class GenerativeModelTests {
)
val tools = listOf(Tool(listOf(getExchangeRate)))
val model =
GenerativeModel("gemini-pro-1.0", apiKey, tools = tools, controller = mockApiController)
GenerativeModel("gemini-pro-1.5", apiKey, tools = tools, controller = mockApiController)
val chat = Chat(model)

coEvery { mockApiController.generateContent(any()) } returns
Expand Down
Loading