From bd5f5544b5ffb6c4537d687ddc14b116af30c493 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Thu, 14 Mar 2024 15:19:01 -0400 Subject: [PATCH 01/41] Update sample app to use v0.2.2 (#83) --- generativeai-android-sample/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generativeai-android-sample/app/build.gradle.kts b/generativeai-android-sample/app/build.gradle.kts index 9e73b16f..9e9fd99f 100644 --- a/generativeai-android-sample/app/build.gradle.kts +++ b/generativeai-android-sample/app/build.gradle.kts @@ -75,5 +75,5 @@ dependencies { debugImplementation("androidx.compose.ui:ui-tooling") debugImplementation("androidx.compose.ui:ui-test-manifest") - implementation("com.google.ai.client.generativeai:generativeai:0.2.0") + implementation("com.google.ai.client.generativeai:generativeai:0.2.2") } From 39396f0e0401c8dfc922bf5aba06161d6d986368 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 20 Mar 2024 13:39:10 -0400 Subject: [PATCH 02/41] Common & genai sdk split (#88) --- common/.gitignore | 1 + common/build.gradle.kts | 126 +++++++++++ common/consumer-rules.pro | 21 ++ common/gradle.properties | 1 + common/proguard-rules.pro | 21 ++ common/src/main/AndroidManifest.xml | 18 ++ .../generativeai/common}/APIController.kt | 117 ++++++----- .../client/generativeai/common/Exceptions.kt | 113 ++++++++++ .../ai/client/generativeai/common}/Request.kt | 16 +- .../generativeai/common/RequestOptions.kt | 40 ++++ .../client/generativeai/common}/Response.kt | 18 +- .../generativeai/common}/client/Types.kt | 6 +- .../generativeai/common}/server/Types.kt | 34 +-- .../generativeai/common}/shared/Types.kt | 26 +-- .../client/generativeai/common/util/kotlin.kt | 41 ++++ .../client/generativeai/common}/util/ktor.kt | 4 +- .../common}/util/serialization.kt | 13 +- .../common/GenerativeModelTests.kt | 112 ++++++++++ .../common}/StreamingSnapshotTests.kt | 84 ++++---- .../generativeai/common/UnarySnapshotTests.kt | 195 ++++++++++++++++++ .../generativeai/common}/util/kotlin.kt | 4 +- .../client/generativeai/common}/util/tests.kt | 46 ++--- .../streaming/failure-api-key.txt | 0 .../streaming/failure-empty-content.txt | 0 .../failure-finish-reason-safety.txt | 0 .../streaming/failure-http-error.txt | 0 .../streaming/failure-image-rejected.txt | 0 .../failure-prompt-blocked-safety.txt | 0 .../failure-recitation-no-content.txt | 0 .../streaming/failure-unknown-model.txt | 0 .../streaming/success-basic-reply-long.txt | 0 .../streaming/success-basic-reply-short.txt | 0 .../streaming/success-citations-altname.txt | 0 .../streaming/success-citations.txt | 0 .../streaming/success-quotes-escaped.txt | 2 +- .../streaming/success-unknown-enum.txt | 0 .../golden-files/unary/failure-api-key.json | 0 .../unary/failure-empty-content.json | 0 .../unary/failure-finish-reason-safety.json | 0 .../unary/failure-http-error.json | 0 .../unary/failure-image-rejected.json | 0 .../unary/failure-invalid-response.json | 0 .../unary/failure-malformed-content.json | 0 .../unary/failure-prompt-blocked-safety.json | 0 .../unary/failure-unknown-model.json | 0 .../failure-unsupported-user-location.json | 0 .../unary/success-basic-reply-long.json | 0 .../unary/success-basic-reply-short.json | 0 .../unary/success-citations-altname.json | 0 .../golden-files/unary/success-citations.json | 0 .../unary/success-quote-reply.json | 0 .../unary/success-unknown-enum.json | 0 generativeai/build.gradle.kts | 16 +- .../ai/client/generativeai/GenerativeModel.kt | 10 +- .../generativeai/internal/util/conversions.kt | 40 ++-- .../ai/client/generativeai/type/Exceptions.kt | 35 +++- .../generativeai/type/RequestOptions.kt | 8 +- .../generativeai/GenerativeModelTests.kt | 166 ++++++++------- .../client/generativeai/UnarySnapshotTests.kt | 167 --------------- .../internal/util/ConversionsTest.kt | 64 ------ settings.gradle.kts | 1 + 61 files changed, 1041 insertions(+), 525 deletions(-) create mode 100644 common/.gitignore create mode 100644 common/build.gradle.kts create mode 100644 common/consumer-rules.pro create mode 100644 common/gradle.properties create mode 100644 common/proguard-rules.pro create mode 100644 common/src/main/AndroidManifest.xml rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal/api => common/src/main/kotlin/com/google/ai/client/generativeai/common}/APIController.kt (66%) create mode 100644 common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal/api => common/src/main/kotlin/com/google/ai/client/generativeai/common}/Request.kt (65%) create mode 100644 common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal/api => common/src/main/kotlin/com/google/ai/client/generativeai/common}/Response.kt (56%) rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal/api => common/src/main/kotlin/com/google/ai/client/generativeai/common}/client/Types.kt (88%) rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal/api => common/src/main/kotlin/com/google/ai/client/generativeai/common}/server/Types.kt (74%) rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal/api => common/src/main/kotlin/com/google/ai/client/generativeai/common}/shared/Types.kt (71%) create mode 100644 common/src/main/kotlin/com/google/ai/client/generativeai/common/util/kotlin.kt rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal => common/src/main/kotlin/com/google/ai/client/generativeai/common}/util/ktor.kt (97%) rename {generativeai/src/main/java/com/google/ai/client/generativeai/internal => common/src/main/kotlin/com/google/ai/client/generativeai/common}/util/serialization.kt (88%) create mode 100644 common/src/test/java/com/google/ai/client/generativeai/common/GenerativeModelTests.kt rename {generativeai/src/test/java/com/google/ai/client/generativeai => common/src/test/java/com/google/ai/client/generativeai/common}/StreamingSnapshotTests.kt (56%) create mode 100644 common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt rename {generativeai/src/test/java/com/google/ai/client/generativeai => common/src/test/java/com/google/ai/client/generativeai/common}/util/kotlin.kt (93%) rename {generativeai/src/test/java/com/google/ai/client/generativeai => common/src/test/java/com/google/ai/client/generativeai/common}/util/tests.kt (78%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-api-key.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-empty-content.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-finish-reason-safety.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-http-error.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-image-rejected.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-prompt-blocked-safety.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-recitation-no-content.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/failure-unknown-model.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/success-basic-reply-long.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/success-basic-reply-short.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/success-citations-altname.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/success-citations.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/streaming/success-quotes-escaped.txt (64%) rename {generativeai => common}/src/test/resources/golden-files/streaming/success-unknown-enum.txt (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-api-key.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-empty-content.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-finish-reason-safety.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-http-error.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-image-rejected.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-invalid-response.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-malformed-content.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-prompt-blocked-safety.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-unknown-model.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/failure-unsupported-user-location.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/success-basic-reply-long.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/success-basic-reply-short.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/success-citations-altname.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/success-citations.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/success-quote-reply.json (100%) rename {generativeai => common}/src/test/resources/golden-files/unary/success-unknown-enum.json (100%) delete mode 100644 generativeai/src/test/java/com/google/ai/client/generativeai/UnarySnapshotTests.kt delete mode 100644 generativeai/src/test/java/com/google/ai/client/generativeai/internal/util/ConversionsTest.kt diff --git a/common/.gitignore b/common/.gitignore new file mode 100644 index 00000000..796b96d1 --- /dev/null +++ b/common/.gitignore @@ -0,0 +1 @@ +/build diff --git a/common/build.gradle.kts b/common/build.gradle.kts new file mode 100644 index 00000000..bd02f5fa --- /dev/null +++ b/common/build.gradle.kts @@ -0,0 +1,126 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +plugins { + id("com.android.library") + id("maven-publish") + id("com.ncorti.ktfmt.gradle") + id("changelog-plugin") + id("release-plugin") + kotlin("android") + kotlin("plugin.serialization") +} + +ktfmt { + googleStyle() +} + +android { + namespace = "com.google.ai.client.generativeai.common" + compileSdk = 34 + + buildFeatures.buildConfig = true + + defaultConfig { + minSdk = 21 + + testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" + consumerProguardFiles("consumer-rules.pro") + + buildConfigField("String", "VERSION_NAME", "\"${project.version.toString()}\"") + } + + publishing { + singleVariant("release") { + withSourcesJar() + } + } + + buildTypes { + release { + isMinifyEnabled = false + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) + } + } + compileOptions { + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 + } + kotlinOptions { + jvmTarget = "17" + } + + testOptions { + unitTests.isReturnDefaultValues = true + } +} + +dependencies { + val ktorVersion = "2.3.2" + + implementation("io.ktor:ktor-client-okhttp:$ktorVersion") + implementation("io.ktor:ktor-client-core:$ktorVersion") + implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion") + implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") + implementation("io.ktor:ktor-client-logging:$ktorVersion") + + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1") + implementation("androidx.core:core-ktx:1.12.0") + implementation("org.slf4j:slf4j-nop:2.0.9") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive:1.7.3") + implementation("org.reactivestreams:reactive-streams:1.0.3") + + implementation("com.google.guava:listenablefuture:1.0") + implementation("androidx.concurrent:concurrent-futures:1.2.0-alpha02") + implementation("androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha02") + testImplementation("junit:junit:4.13.2") + testImplementation("io.kotest:kotest-assertions-core:4.0.7") + testImplementation("io.kotest:kotest-assertions-jvm:4.0.7") + testImplementation("io.kotest:kotest-assertions-json:4.0.7") + testImplementation("io.ktor:ktor-client-mock:$ktorVersion") + androidTestImplementation("androidx.test.ext:junit:1.1.5") + androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") +} + +publishing { + publications { + register("release") { + groupId = "com.google.ai.client.generativeai" + artifactId = "common" + version = project.version.toString() + pom { + licenses { + license { + name = "The Apache License, Version 2.0" + url = "http://www.apache.org/licenses/LICENSE-2.0.txt" + } + } + } + afterEvaluate { + from(components["release"]) + } + } + } + repositories { + maven { + url = uri("${projectDir}/m2") + } + } +} diff --git a/common/consumer-rules.pro b/common/consumer-rules.pro new file mode 100644 index 00000000..f1b42451 --- /dev/null +++ b/common/consumer-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/common/gradle.properties b/common/gradle.properties new file mode 100644 index 00000000..de55ab65 --- /dev/null +++ b/common/gradle.properties @@ -0,0 +1 @@ +version=0.1.0 diff --git a/common/proguard-rules.pro b/common/proguard-rules.pro new file mode 100644 index 00000000..f1b42451 --- /dev/null +++ b/common/proguard-rules.pro @@ -0,0 +1,21 @@ +# Add project specific ProGuard rules here. +# You can control the set of applied configuration files using the +# proguardFiles setting in build.gradle. +# +# For more details, see +# http://developer.android.com/guide/developing/tools/proguard.html + +# If your project uses WebView with JS, uncomment the following +# and specify the fully qualified class name to the JavaScript interface +# class: +#-keepclassmembers class fqcn.of.javascript.interface.for.webview { +# public *; +#} + +# Uncomment this to preserve the line number information for +# debugging stack traces. +#-keepattributes SourceFile,LineNumberTable + +# If you keep the line number information, uncomment this to +# hide the original source file name. +#-renamesourcefileattribute SourceFile diff --git a/common/src/main/AndroidManifest.xml b/common/src/main/AndroidManifest.xml new file mode 100644 index 00000000..7ebb9c28 --- /dev/null +++ b/common/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + + diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/APIController.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt similarity index 66% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/APIController.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt index dc3c343f..13cfccc2 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/APIController.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,14 +14,10 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.internal.api +package com.google.ai.client.generativeai.common -import com.google.ai.client.generativeai.BuildConfig -import com.google.ai.client.generativeai.internal.util.decodeToFlow -import com.google.ai.client.generativeai.type.InvalidAPIKeyException -import com.google.ai.client.generativeai.type.RequestOptions -import com.google.ai.client.generativeai.type.ServerException -import com.google.ai.client.generativeai.type.UnsupportedUserLocationException +import com.google.ai.client.generativeai.common.server.FinishReason +import com.google.ai.client.generativeai.common.util.decodeToFlow import io.ktor.client.HttpClient import io.ktor.client.call.body import io.ktor.client.engine.HttpClientEngine @@ -42,14 +38,16 @@ import io.ktor.http.contentType import io.ktor.serialization.kotlinx.json.json import kotlinx.coroutines.CoroutineName import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.channelFlow +import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.timeout import kotlinx.coroutines.launch import kotlinx.serialization.json.Json -internal const val DOMAIN = "https://generativelanguage.googleapis.com" +const val DOMAIN = "https://generativelanguage.googleapis.com" -internal val JSON = Json { +val JSON = Json { ignoreUnknownKeys = true prettyPrint = false } @@ -63,15 +61,21 @@ internal val JSON = Json { * Exposed primarily for DI in tests. * @property key The API key used for authentication. * @property model The model to use for generation. - * @property apiVersion the endpoint version to communicate with. - * @property timeout the maximum amount of time for a request to take in the initial exchange. */ -internal class APIController( +class APIController +internal constructor( private val key: String, model: String, private val requestOptions: RequestOptions, - httpEngine: HttpClientEngine = OkHttp.create(), + httpEngine: HttpClientEngine ) { + + constructor( + key: String, + model: String, + requestOptions: RequestOptions + ) : this(key, model, requestOptions, OkHttp.create()) + private val model = fullModelName(model) private val client = @@ -84,28 +88,39 @@ internal class APIController( } suspend fun generateContent(request: GenerateContentRequest): GenerateContentResponse = - client - .post("$DOMAIN/${requestOptions.apiVersion}/$model:generateContent") { - applyCommonConfiguration(request) - } - .also { validateResponse(it) } - .body() - - fun generateContentStream(request: GenerateContentRequest): Flow { - return client.postStream( - "$DOMAIN/${requestOptions.apiVersion}/$model:streamGenerateContent?alt=sse" - ) { - applyCommonConfiguration(request) + try { + client + .post("$DOMAIN/${requestOptions.apiVersion}/$model:generateContent") { + applyCommonConfiguration(request) + } + .also { validateResponse(it) } + .body() + .validate() + } catch (e: Throwable) { + throw GoogleGenerativeAIException.from(e) } - } - suspend fun countTokens(request: CountTokensRequest): CountTokensResponse = + fun generateContentStream(request: GenerateContentRequest): Flow = client - .post("$DOMAIN/${requestOptions.apiVersion}/$model:countTokens") { + .postStream( + "$DOMAIN/${requestOptions.apiVersion}/$model:streamGenerateContent?alt=sse" + ) { applyCommonConfiguration(request) } - .also { validateResponse(it) } - .body() + .map { it.validate() } + .catch { throw GoogleGenerativeAIException.from(it) } + + suspend fun countTokens(request: CountTokensRequest): CountTokensResponse = + try { + client + .post("$DOMAIN/${requestOptions.apiVersion}/$model:countTokens") { + applyCommonConfiguration(request) + } + .also { validateResponse(it) } + .body() + } catch (e: Throwable) { + throw GoogleGenerativeAIException.from(e) + } private fun HttpRequestBuilder.applyCommonConfiguration(request: Request) { when (request) { @@ -170,21 +185,31 @@ private inline fun HttpClient.postStream( } private suspend fun validateResponse(response: HttpResponse) { - if (response.status != HttpStatusCode.OK) { - val text = response.bodyAsText() - val message = - try { - JSON.decodeFromString(text).error.message - } catch (e: Throwable) { - "Unexpected Response:\n$text" - } - if (message.contains("API key not valid")) { - throw InvalidAPIKeyException(message) - } - // TODO (b/325117891): Use a better method than string matching. - if (message == "User location is not supported for the API use.") { - throw UnsupportedUserLocationException() + if (response.status == HttpStatusCode.OK) return + val text = response.bodyAsText() + val message = + try { + JSON.decodeFromString(text).error.message + } catch (e: Throwable) { + "Unexpected Response:\n$text" } - throw ServerException(message) + if (message.contains("API key not valid")) { + throw InvalidAPIKeyException(message) + } + // TODO (b/325117891): Use a better method than string matching. + if (message == "User location is not supported for the API use.") { + throw UnsupportedUserLocationException() + } + throw ServerException(message) +} + +private fun GenerateContentResponse.validate() = apply { + if ((candidates?.isEmpty() != false) && promptFeedback == null) { + throw SerializationException("Error deserializing response, found no valid fields") } + promptFeedback?.blockReason?.let { throw PromptBlockedException(this) } + candidates + ?.mapNotNull { it.finishReason } + ?.firstOrNull { it != FinishReason.STOP } + ?.let { throw ResponseStoppedException(this) } } diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt new file mode 100644 index 00000000..d28ea2ff --- /dev/null +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt @@ -0,0 +1,113 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.common + +import io.ktor.serialization.JsonConvertException +import kotlinx.coroutines.TimeoutCancellationException + +/** Parent class for any errors that occur. */ +sealed class GoogleGenerativeAIException(message: String, cause: Throwable? = null) : + RuntimeException(message, cause) { + companion object { + + /** + * Converts a [Throwable] to a [GoogleGenerativeAIException]. + * + * Will populate default messages as expected, and propagate the provided [cause] through the + * resulting exception. + */ + fun from(cause: Throwable): GoogleGenerativeAIException = + when (cause) { + is GoogleGenerativeAIException -> cause + is JsonConvertException, + is kotlinx.serialization.SerializationException -> + SerializationException( + "Something went wrong while trying to deserialize a response from the server.", + cause + ) + is TimeoutCancellationException -> + RequestTimeoutException("The request failed to complete in the allotted time.") + else -> UnknownException("Something unexpected happened.", cause) + } + } +} + +/** Something went wrong while trying to deserialize a response from the server. */ +class SerializationException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) + +/** The server responded with a non 200 response code. */ +class ServerException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) + +/** The server responded that the API Key is no valid. */ +class InvalidAPIKeyException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) + +/** + * A request was blocked for some reason. + * + * See the [response's][response] `promptFeedback.blockReason` for more information. + * + * @property response the full server response for the request. + */ +class PromptBlockedException(val response: GenerateContentResponse, cause: Throwable? = null) : + GoogleGenerativeAIException( + "Prompt was blocked: ${response.promptFeedback?.blockReason?.name}", + cause + ) + +/** + * The user's location (region) is not supported by the API. + * + * See the Google documentation for a + * [list of regions](https://ai.google.dev/available_regions#available_regions) (countries and + * territories) where the API is available. + */ +class UnsupportedUserLocationException(cause: Throwable? = null) : + GoogleGenerativeAIException("User location is not supported for the API use.", cause) + +/** + * Some form of state occurred that shouldn't have. + * + * Usually indicative of consumer error. + */ +class InvalidStateException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) + +/** + * A request was stopped during generation for some reason. + * + * @property response the full server response for the request + */ +class ResponseStoppedException(val response: GenerateContentResponse, cause: Throwable? = null) : + GoogleGenerativeAIException( + "Content generation stopped. Reason: ${response.candidates?.first()?.finishReason?.name}", + cause + ) + +/** + * A request took too long to complete. + * + * Usually occurs due to a user specified [timeout][RequestOptions.timeout]. + */ +class RequestTimeoutException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) + +/** Catch all case for exceptions not explicitly expected. */ +class UnknownException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/Request.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt similarity index 65% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/Request.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt index 44cbe85d..89afce30 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/Request.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,18 +14,18 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.internal.api +package com.google.ai.client.generativeai.common -import com.google.ai.client.generativeai.internal.api.client.GenerationConfig -import com.google.ai.client.generativeai.internal.api.shared.Content -import com.google.ai.client.generativeai.internal.api.shared.SafetySetting +import com.google.ai.client.generativeai.common.client.GenerationConfig +import com.google.ai.client.generativeai.common.shared.Content +import com.google.ai.client.generativeai.common.shared.SafetySetting import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable -internal sealed interface Request +sealed interface Request @Serializable -internal data class GenerateContentRequest( +data class GenerateContentRequest( val model: String, val contents: List, @SerialName("safety_settings") val safetySettings: List? = null, @@ -33,4 +33,4 @@ internal data class GenerateContentRequest( ) : Request @Serializable -internal data class CountTokensRequest(val model: String, val contents: List) : Request +data class CountTokensRequest(val model: String, val contents: List) : Request diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt new file mode 100644 index 00000000..82ea8842 --- /dev/null +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt @@ -0,0 +1,40 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.common + +import io.ktor.client.plugins.HttpTimeout +import kotlin.time.Duration +import kotlin.time.DurationUnit +import kotlin.time.toDuration + +/** + * Configurable options unique to how requests to the backend are performed. + * + * @property timeout the maximum amount of time for a request to take, from the first request to + * first response. + * @property apiVersion the api endpoint to call. + */ +class RequestOptions(val timeout: Duration, val apiVersion: String = "v1") { + @JvmOverloads + constructor( + timeout: Long? = HttpTimeout.INFINITE_TIMEOUT_MS, + apiVersion: String = "v1" + ) : this( + (timeout ?: HttpTimeout.INFINITE_TIMEOUT_MS).toDuration(DurationUnit.MILLISECONDS), + apiVersion + ) +} diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/Response.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt similarity index 56% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/Response.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt index df142c4f..c8801e37 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/Response.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,21 +14,21 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.internal.api +package com.google.ai.client.generativeai.common -import com.google.ai.client.generativeai.internal.api.server.Candidate -import com.google.ai.client.generativeai.internal.api.server.GRpcError -import com.google.ai.client.generativeai.internal.api.server.PromptFeedback +import com.google.ai.client.generativeai.common.server.Candidate +import com.google.ai.client.generativeai.common.server.GRpcError +import com.google.ai.client.generativeai.common.server.PromptFeedback import kotlinx.serialization.Serializable -internal sealed interface Response +sealed interface Response @Serializable -internal data class GenerateContentResponse( +data class GenerateContentResponse( val candidates: List? = null, val promptFeedback: PromptFeedback? = null, ) : Response -@Serializable internal data class CountTokensResponse(val totalTokens: Int) : Response +@Serializable data class CountTokensResponse(val totalTokens: Int) : Response -@Serializable internal data class GRpcErrorResponse(val error: GRpcError) : Response +@Serializable data class GRpcErrorResponse(val error: GRpcError) : Response diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/client/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt similarity index 88% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/client/Types.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt index f1f778bf..bacbb1f1 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/client/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.internal.api.client +package com.google.ai.client.generativeai.common.client import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable -internal data class GenerationConfig( +data class GenerationConfig( val temperature: Float?, @SerialName("top_p") val topP: Float?, @SerialName("top_k") val topK: Int?, diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/server/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt similarity index 74% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/server/Types.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt index 21b8bd30..cd5a0d66 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/server/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,34 +14,34 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.internal.api.server +package com.google.ai.client.generativeai.common.server -import com.google.ai.client.generativeai.internal.api.shared.Content -import com.google.ai.client.generativeai.internal.api.shared.HarmCategory -import com.google.ai.client.generativeai.internal.util.FirstOrdinalSerializer +import com.google.ai.client.generativeai.common.shared.Content +import com.google.ai.client.generativeai.common.shared.HarmCategory +import com.google.ai.client.generativeai.common.util.FirstOrdinalSerializer import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames -internal object BlockReasonSerializer : +object BlockReasonSerializer : KSerializer by FirstOrdinalSerializer(BlockReason::class) -internal object HarmProbabilitySerializer : +object HarmProbabilitySerializer : KSerializer by FirstOrdinalSerializer(HarmProbability::class) -internal object FinishReasonSerializer : +object FinishReasonSerializer : KSerializer by FirstOrdinalSerializer(FinishReason::class) @Serializable -internal data class PromptFeedback( +data class PromptFeedback( val blockReason: BlockReason? = null, val safetyRatings: List? = null, ) @Serializable(BlockReasonSerializer::class) -internal enum class BlockReason { +enum class BlockReason { UNKNOWN, @SerialName("BLOCKED_REASON_UNSPECIFIED") UNSPECIFIED, SAFETY, @@ -49,7 +49,7 @@ internal enum class BlockReason { } @Serializable -internal data class Candidate( +data class Candidate( val content: Content? = null, val finishReason: FinishReason? = null, val safetyRatings: List? = null, @@ -57,12 +57,12 @@ internal data class Candidate( ) @Serializable -internal data class CitationMetadata +data class CitationMetadata @OptIn(ExperimentalSerializationApi::class) constructor(@JsonNames("citations") val citationSources: List) @Serializable -internal data class CitationSources( +data class CitationSources( val startIndex: Int, val endIndex: Int, val uri: String, @@ -70,14 +70,14 @@ internal data class CitationSources( ) @Serializable -internal data class SafetyRating( +data class SafetyRating( val category: HarmCategory, val probability: HarmProbability, val blocked: Boolean? = null // TODO(): any reason not to default to false? ) @Serializable(HarmProbabilitySerializer::class) -internal enum class HarmProbability { +enum class HarmProbability { UNKNOWN, @SerialName("HARM_PROBABILITY_UNSPECIFIED") UNSPECIFIED, NEGLIGIBLE, @@ -87,7 +87,7 @@ internal enum class HarmProbability { } @Serializable(FinishReasonSerializer::class) -internal enum class FinishReason { +enum class FinishReason { UNKNOWN, @SerialName("FINISH_REASON_UNSPECIFIED") UNSPECIFIED, STOP, @@ -98,7 +98,7 @@ internal enum class FinishReason { } @Serializable -internal data class GRpcError( +data class GRpcError( val code: Int, val message: String, ) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/shared/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt similarity index 71% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/shared/Types.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt index 6202a619..8fc641be 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/api/shared/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,9 +14,9 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.internal.api.shared +package com.google.ai.client.generativeai.common.shared -import com.google.ai.client.generativeai.internal.util.FirstOrdinalSerializer +import com.google.ai.client.generativeai.common.util.FirstOrdinalSerializer import kotlinx.serialization.DeserializationStrategy import kotlinx.serialization.EncodeDefault import kotlinx.serialization.ExperimentalSerializationApi @@ -28,11 +28,11 @@ import kotlinx.serialization.json.JsonContentPolymorphicSerializer import kotlinx.serialization.json.JsonElement import kotlinx.serialization.json.jsonObject -internal object HarmCategorySerializer : +object HarmCategorySerializer : KSerializer by FirstOrdinalSerializer(HarmCategory::class) @Serializable(HarmCategorySerializer::class) -internal enum class HarmCategory { +enum class HarmCategory { UNKNOWN, @SerialName("HARM_CATEGORY_HARASSMENT") HARASSMENT, @SerialName("HARM_CATEGORY_HATE_SPEECH") HATE_SPEECH, @@ -44,25 +44,25 @@ typealias Base64 = String @ExperimentalSerializationApi @Serializable -internal data class Content(@EncodeDefault val role: String? = "user", val parts: List) +data class Content(@EncodeDefault val role: String? = "user", val parts: List) -@Serializable(PartSerializer::class) internal sealed interface Part +@Serializable(PartSerializer::class) sealed interface Part -@Serializable internal data class TextPart(val text: String) : Part +@Serializable data class TextPart(val text: String) : Part -@Serializable internal data class BlobPart(@SerialName("inline_data") val inlineData: Blob) : Part +@Serializable data class BlobPart(@SerialName("inline_data") val inlineData: Blob) : Part @Serializable -internal data class Blob( +data class Blob( @SerialName("mime_type") val mimeType: String, val data: Base64, ) @Serializable -internal data class SafetySetting(val category: HarmCategory, val threshold: HarmBlockThreshold) +data class SafetySetting(val category: HarmCategory, val threshold: HarmBlockThreshold) @Serializable -internal enum class HarmBlockThreshold { +enum class HarmBlockThreshold { @SerialName("HARM_BLOCK_THRESHOLD_UNSPECIFIED") UNSPECIFIED, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, @@ -70,7 +70,7 @@ internal enum class HarmBlockThreshold { BLOCK_NONE, } -internal object PartSerializer : JsonContentPolymorphicSerializer(Part::class) { +object PartSerializer : JsonContentPolymorphicSerializer(Part::class) { override fun selectDeserializer(element: JsonElement): DeserializationStrategy { val jsonObject = element.jsonObject return when { diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/kotlin.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/kotlin.kt new file mode 100644 index 00000000..8f681542 --- /dev/null +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/kotlin.kt @@ -0,0 +1,41 @@ +/* + * Copyright 2023 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.common.util + +import java.lang.reflect.Field + +/** + * Removes the last character from the [StringBuilder]. + * + * If the StringBuilder is empty, calling this function will throw an [IndexOutOfBoundsException]. + * + * @return The [StringBuilder] used to make the call, for optional chaining. + * @throws IndexOutOfBoundsException if the StringBuilder is empty. + */ +internal fun StringBuilder.removeLast(): StringBuilder = + if (isEmpty()) throw IndexOutOfBoundsException("StringBuilder is empty.") + else deleteCharAt(length - 1) + +/** + * A variant of [getAnnotation][Field.getAnnotation] that provides implicit Kotlin support. + * + * Syntax sugar for: + * ``` + * getAnnotation(T::class.java) + * ``` + */ +internal inline fun Field.getAnnotation() = getAnnotation(T::class.java) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/ktor.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/ktor.kt similarity index 97% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/ktor.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/util/ktor.kt index ae3434e3..04eb18dc 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/ktor.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/ktor.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,7 +16,7 @@ @file:Suppress("DEPRECATION") // a replacement for our purposes has not been published yet -package com.google.ai.client.generativeai.internal.util +package com.google.ai.client.generativeai.common.util import io.ktor.utils.io.ByteChannel import io.ktor.utils.io.ByteReadChannel diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/serialization.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/serialization.kt similarity index 88% rename from generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/serialization.kt rename to common/src/main/kotlin/com/google/ai/client/generativeai/common/util/serialization.kt index 76405fe3..d818c266 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/serialization.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/serialization.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,10 +14,10 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.internal.util +package com.google.ai.client.generativeai.common.util import android.util.Log -import com.google.ai.client.generativeai.type.SerializationException +import com.google.ai.client.generativeai.common.SerializationException import kotlin.reflect.KClass import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName @@ -34,8 +34,7 @@ import kotlinx.serialization.encoding.Encoder * When an unknown enum value is found, the enum itself will be logged to stderr with a message * about opening an issue on GitHub regarding the new enum value. */ -internal class FirstOrdinalSerializer>(private val enumClass: KClass) : - KSerializer { +class FirstOrdinalSerializer>(private val enumClass: KClass) : KSerializer { override val descriptor: SerialDescriptor = buildClassSerialDescriptor("FirstOrdinalSerializer") override fun deserialize(decoder: Decoder): T { @@ -71,7 +70,7 @@ internal class FirstOrdinalSerializer>(private val enumClass: KClass * By default an enum is serialized to its [name][Enum.name], and can be overwritten by providing a * [SerialName] annotation. */ -internal val > T.serialName: String +val > T.serialName: String get() = declaringJavaClass.getField(name).getAnnotation()?.value ?: name /** @@ -80,5 +79,5 @@ internal val > T.serialName: String * @throws SerializationException if the class is not a valid enum. Beyond runtime emily magic, this * shouldn't really be possible. */ -internal fun > KClass.enumValues(): Array = +fun > KClass.enumValues(): Array = java.enumConstants ?: throw SerializationException("$simpleName is not a valid enum type.") diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/GenerativeModelTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/GenerativeModelTests.kt new file mode 100644 index 00000000..6269b673 --- /dev/null +++ b/common/src/test/java/com/google/ai/client/generativeai/common/GenerativeModelTests.kt @@ -0,0 +1,112 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.common + +import com.google.ai.client.generativeai.common.shared.Content +import com.google.ai.client.generativeai.common.shared.TextPart +import com.google.ai.client.generativeai.common.util.commonTest +import com.google.ai.client.generativeai.common.util.createResponses +import com.google.ai.client.generativeai.common.util.doBlocking +import com.google.ai.client.generativeai.common.util.prepareStreamingResponse +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldContain +import io.ktor.client.engine.mock.MockEngine +import io.ktor.client.engine.mock.respond +import io.ktor.http.HttpHeaders +import io.ktor.http.HttpStatusCode +import io.ktor.http.headersOf +import io.ktor.utils.io.ByteChannel +import io.ktor.utils.io.close +import io.ktor.utils.io.writeFully +import kotlin.time.Duration.Companion.seconds +import kotlinx.coroutines.withTimeout +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.Parameterized + +internal class GenerativeModelTests { + private val testTimeout = 5.seconds + + @Test + fun `(generateContentStream) emits responses as they come in`() = commonTest { + val response = createResponses("The", " world", " is", " a", " beautiful", " place!") + val bytes = prepareStreamingResponse(response) + + bytes.forEach { channel.writeFully(it) } + val responses = apiController.generateContentStream(textGenerateContentRequest("test")) + + withTimeout(testTimeout) { + responses.collect { + it.candidates?.isEmpty() shouldBe false + channel.close() + } + } + } + + @Test + fun `(generateContent) respects a custom timeout`() = + commonTest(requestOptions = RequestOptions(2.seconds)) { + shouldThrow { + withTimeout(testTimeout) { + apiController.generateContent(textGenerateContentRequest("test")) + } + } + } +} + +@RunWith(Parameterized::class) +internal class ModelNamingTests(private val modelName: String, private val actualName: String) { + + @Test + fun `request should include right model name`() = doBlocking { + val channel = ByteChannel(autoFlush = true) + val mockEngine = MockEngine { + respond(channel, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } + val controller = APIController("super_cool_test_key", modelName, RequestOptions(), mockEngine) + + withTimeout(5.seconds) { + controller.generateContentStream(textGenerateContentRequest("cats")).collect { + it.candidates?.isEmpty() shouldBe false + channel.close() + } + } + + mockEngine.requestHistory.first().url.encodedPath shouldContain actualName + } + + companion object { + @JvmStatic + @Parameterized.Parameters + fun data() = + listOf( + arrayOf("gemini-pro", "models/gemini-pro"), + arrayOf("x/gemini-pro", "x/gemini-pro"), + arrayOf("models/gemini-pro", "models/gemini-pro"), + arrayOf("/modelname", "/modelname"), + arrayOf("modifiedNaming/mymodel", "modifiedNaming/mymodel"), + ) + } +} + +fun textGenerateContentRequest(prompt: String) = + GenerateContentRequest( + model = "unused", + contents = listOf(Content(parts = listOf(TextPart(prompt)))) + ) diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/StreamingSnapshotTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/StreamingSnapshotTests.kt similarity index 56% rename from generativeai/src/test/java/com/google/ai/client/generativeai/StreamingSnapshotTests.kt rename to common/src/test/java/com/google/ai/client/generativeai/common/StreamingSnapshotTests.kt index 4615bcdc..7f151320 100644 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/StreamingSnapshotTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/StreamingSnapshotTests.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,19 +14,17 @@ * limitations under the License. */ -package com.google.ai.client.generativeai - -import com.google.ai.client.generativeai.type.BlockReason -import com.google.ai.client.generativeai.type.FinishReason -import com.google.ai.client.generativeai.type.HarmCategory -import com.google.ai.client.generativeai.type.InvalidAPIKeyException -import com.google.ai.client.generativeai.type.PromptBlockedException -import com.google.ai.client.generativeai.type.ResponseStoppedException -import com.google.ai.client.generativeai.type.SerializationException -import com.google.ai.client.generativeai.type.ServerException -import com.google.ai.client.generativeai.util.goldenStreamingFile +package com.google.ai.client.generativeai.common + +import com.google.ai.client.generativeai.common.server.BlockReason +import com.google.ai.client.generativeai.common.server.FinishReason +import com.google.ai.client.generativeai.common.shared.HarmCategory +import com.google.ai.client.generativeai.common.shared.TextPart +import com.google.ai.client.generativeai.common.util.goldenStreamingFile import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.nulls.shouldNotBeNull import io.kotest.matchers.shouldBe +import io.kotest.matchers.string.shouldContain import io.ktor.http.HttpStatusCode import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.flow.collect @@ -41,29 +39,29 @@ internal class StreamingSnapshotTests { @Test fun `short reply`() = goldenStreamingFile("success-basic-reply-short.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val responseList = responses.toList() responseList.isEmpty() shouldBe false - responseList.first().candidates.first().finishReason shouldBe FinishReason.STOP - responseList.first().candidates.first().content.parts.isEmpty() shouldBe false - responseList.first().candidates.first().safetyRatings.isEmpty() shouldBe false + responseList.first().candidates?.first()?.finishReason shouldBe FinishReason.STOP + responseList.first().candidates?.first()?.content?.parts?.isEmpty() shouldBe false + responseList.first().candidates?.first()?.safetyRatings?.isEmpty() shouldBe false } } @Test fun `long reply`() = goldenStreamingFile("success-basic-reply-long.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val responseList = responses.toList() responseList.isEmpty() shouldBe false responseList.forEach { - it.candidates.first().finishReason shouldBe FinishReason.STOP - it.candidates.first().content.parts.isEmpty() shouldBe false - it.candidates.first().safetyRatings.isEmpty() shouldBe false + it.candidates?.first()?.finishReason shouldBe FinishReason.STOP + it.candidates?.first()?.content?.parts?.isEmpty() shouldBe false + it.candidates?.first()?.safetyRatings?.isEmpty() shouldBe false } } } @@ -71,11 +69,13 @@ internal class StreamingSnapshotTests { @Test fun `unknown enum`() = goldenStreamingFile("success-unknown-enum.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { responses.first { - it.candidates.any { it.safetyRatings.any { it.category == HarmCategory.UNKNOWN } } + it.candidates?.any { + it.safetyRatings?.any { it.category == HarmCategory.UNKNOWN } ?: false + } ?: false } } } @@ -83,20 +83,22 @@ internal class StreamingSnapshotTests { @Test fun `quotes escaped`() = goldenStreamingFile("success-quotes-escaped.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val responseList = responses.toList() responseList.isEmpty() shouldBe false - responseList.first().text!!.contains("\"") + val part = responseList.first().candidates?.first()?.content?.parts?.first() as? TextPart + part.shouldNotBeNull() + part.text shouldContain "\"" } } @Test fun `prompt blocked for safety`() = goldenStreamingFile("failure-prompt-blocked-safety.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val exception = shouldThrow { responses.collect() } @@ -107,7 +109,7 @@ internal class StreamingSnapshotTests { @Test fun `empty content`() = goldenStreamingFile("failure-empty-content.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { shouldThrow { responses.collect() } } } @@ -115,7 +117,7 @@ internal class StreamingSnapshotTests { @Test fun `http errors`() = goldenStreamingFile("failure-http-error.txt", HttpStatusCode.PreconditionFailed) { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { shouldThrow { responses.collect() } } } @@ -123,51 +125,57 @@ internal class StreamingSnapshotTests { @Test fun `stopped for safety`() = goldenStreamingFile("failure-finish-reason-safety.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val exception = shouldThrow { responses.collect() } - exception.response.candidates.first().finishReason shouldBe FinishReason.SAFETY + exception.response.candidates?.first()?.finishReason shouldBe FinishReason.SAFETY } } @Test fun `citation parsed correctly`() = goldenStreamingFile("success-citations.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val responseList = responses.toList() - responseList.any { it.candidates.any { it.citationMetadata.isNotEmpty() } } shouldBe true + responseList.any { + it.candidates?.any { it.citationMetadata?.citationSources?.isNotEmpty() ?: false } + ?: false + } shouldBe true } } @Test fun `citation returns correctly when using alternative name`() = goldenStreamingFile("success-citations-altname.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val responseList = responses.toList() - responseList.any { it.candidates.any { it.citationMetadata.isNotEmpty() } } shouldBe true + responseList.any { + it.candidates?.any { it.citationMetadata?.citationSources?.isNotEmpty() ?: false } + ?: false + } shouldBe true } } @Test fun `stopped for recitation`() = goldenStreamingFile("failure-recitation-no-content.txt") { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { val exception = shouldThrow { responses.collect() } - exception.response.candidates.first().finishReason shouldBe FinishReason.RECITATION + exception.response.candidates?.first()?.finishReason shouldBe FinishReason.RECITATION } } @Test fun `image rejected`() = goldenStreamingFile("failure-image-rejected.txt", HttpStatusCode.BadRequest) { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { shouldThrow { responses.collect() } } } @@ -175,7 +183,7 @@ internal class StreamingSnapshotTests { @Test fun `unknown model`() = goldenStreamingFile("failure-unknown-model.txt", HttpStatusCode.NotFound) { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { shouldThrow { responses.collect() } } } @@ -183,7 +191,7 @@ internal class StreamingSnapshotTests { @Test fun `invalid api key`() = goldenStreamingFile("failure-api-key.txt", HttpStatusCode.BadRequest) { - val responses = model.generateContentStream() + val responses = apiController.generateContentStream(textGenerateContentRequest("prompt")) withTimeout(testTimeout) { shouldThrow { responses.collect() } } } diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt new file mode 100644 index 00000000..a05284da --- /dev/null +++ b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt @@ -0,0 +1,195 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.common + +import com.google.ai.client.generativeai.common.server.BlockReason +import com.google.ai.client.generativeai.common.server.FinishReason +import com.google.ai.client.generativeai.common.shared.HarmCategory +import com.google.ai.client.generativeai.common.util.goldenUnaryFile +import io.kotest.assertions.throwables.shouldThrow +import io.kotest.matchers.should +import io.kotest.matchers.shouldBe +import io.ktor.http.HttpStatusCode +import kotlin.time.Duration.Companion.seconds +import kotlinx.coroutines.withTimeout +import org.junit.Test + +internal class UnarySnapshotTests { + private val testTimeout = 5.seconds + + @Test + fun `short reply`() = + goldenUnaryFile("success-basic-reply-short.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.finishReason shouldBe FinishReason.STOP + response.candidates?.first()?.content?.parts?.isEmpty() shouldBe false + response.candidates?.first()?.safetyRatings?.isEmpty() shouldBe false + } + } + + @Test + fun `long reply`() = + goldenUnaryFile("success-basic-reply-long.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.finishReason shouldBe FinishReason.STOP + response.candidates?.first()?.content?.parts?.isEmpty() shouldBe false + response.candidates?.first()?.safetyRatings?.isEmpty() shouldBe false + } + } + + @Test + fun `unknown enum`() = + goldenUnaryFile("success-unknown-enum.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.first { + it.safetyRatings?.any { it.category == HarmCategory.UNKNOWN } ?: false + } + } + } + + @Test + fun `prompt blocked for safety`() = + goldenUnaryFile("failure-prompt-blocked-safety.json") { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } should { it.response.promptFeedback?.blockReason shouldBe BlockReason.SAFETY } + } + } + + @Test + fun `empty content`() = + goldenUnaryFile("failure-empty-content.json") { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + + @Test + fun `http error`() = + goldenUnaryFile("failure-http-error.json", HttpStatusCode.PreconditionFailed) { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + + @Test + fun `user location error`() = + goldenUnaryFile("failure-unsupported-user-location.json", HttpStatusCode.PreconditionFailed) { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + + @Test + fun `stopped for safety`() = + goldenUnaryFile("failure-finish-reason-safety.json") { + withTimeout(testTimeout) { + val exception = + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + exception.response.candidates?.first()?.finishReason shouldBe FinishReason.SAFETY + } + } + + @Test + fun `citation returns correctly`() = + goldenUnaryFile("success-citations.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.citationMetadata?.citationSources?.isNotEmpty() shouldBe true + } + } + + @Test + fun `citation returns correctly when using alternative name`() = + goldenUnaryFile("success-citations-altname.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.citationMetadata?.citationSources?.isNotEmpty() shouldBe true + } + } + + @Test + fun `invalid response`() = + goldenUnaryFile("failure-invalid-response.json") { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + + @Test + fun `malformed content`() = + goldenUnaryFile("failure-malformed-content.json") { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + + @Test + fun `invalid api key`() = + goldenUnaryFile("failure-api-key.json", HttpStatusCode.BadRequest) { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + + @Test + fun `image rejected`() = + goldenUnaryFile("failure-image-rejected.json", HttpStatusCode.BadRequest) { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + + @Test + fun `unknown model`() = + goldenUnaryFile("failure-unknown-model.json", HttpStatusCode.NotFound) { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } +} diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/util/kotlin.kt b/common/src/test/java/com/google/ai/client/generativeai/common/util/kotlin.kt similarity index 93% rename from generativeai/src/test/java/com/google/ai/client/generativeai/util/kotlin.kt rename to common/src/test/java/com/google/ai/client/generativeai/common/util/kotlin.kt index 259f72eb..c7ebf102 100644 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/util/kotlin.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/util/kotlin.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.util +package com.google.ai.client.generativeai.common.util import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.runBlocking diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/util/tests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt similarity index 78% rename from generativeai/src/test/java/com/google/ai/client/generativeai/util/tests.kt rename to common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt index 90707336..d753a9bf 100644 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/util/tests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,19 +16,16 @@ @file:Suppress("DEPRECATION") // a replacement for our purposes has not been published yet -package com.google.ai.client.generativeai.util - -import com.google.ai.client.generativeai.GenerativeModel -import com.google.ai.client.generativeai.internal.api.APIController -import com.google.ai.client.generativeai.internal.api.GenerateContentRequest -import com.google.ai.client.generativeai.internal.api.GenerateContentResponse -import com.google.ai.client.generativeai.internal.api.JSON -import com.google.ai.client.generativeai.internal.api.server.Candidate -import com.google.ai.client.generativeai.internal.api.shared.Content -import com.google.ai.client.generativeai.internal.api.shared.TextPart -import com.google.ai.client.generativeai.internal.util.SSE_SEPARATOR -import com.google.ai.client.generativeai.internal.util.send -import com.google.ai.client.generativeai.type.RequestOptions +package com.google.ai.client.generativeai.common.util + +import com.google.ai.client.generativeai.common.APIController +import com.google.ai.client.generativeai.common.GenerateContentRequest +import com.google.ai.client.generativeai.common.GenerateContentResponse +import com.google.ai.client.generativeai.common.JSON +import com.google.ai.client.generativeai.common.RequestOptions +import com.google.ai.client.generativeai.common.server.Candidate +import com.google.ai.client.generativeai.common.shared.Content +import com.google.ai.client.generativeai.common.shared.TextPart import io.ktor.client.engine.mock.MockEngine import io.ktor.client.engine.mock.respond import io.ktor.http.HttpHeaders @@ -65,11 +62,11 @@ internal fun createResponses(vararg text: String): List * Wrapper around common instances needed in tests. * * @param channel A [ByteChannel] for sending responses through the mock HTTP engine - * @param model A [GenerativeModel] that consumes the [channel] + * @param apiController A [APIController] that consumes the [channel] * @see commonTest * @see send */ -internal data class CommonTestScope(val channel: ByteChannel, val model: GenerativeModel) +internal data class CommonTestScope(val channel: ByteChannel, val apiController: APIController) /** A test that runs under a [CommonTestScope]. */ internal typealias CommonTest = suspend CommonTestScope.() -> Unit @@ -107,23 +104,10 @@ internal fun commonTest( val mockEngine = MockEngine { respond(channel, status, headersOf(HttpHeaders.ContentType, "application/json")) } - val model = createGenerativeModel("gemini-pro", "super_cool_test_key", requestOptions, mockEngine) - CommonTestScope(channel, model).block() + val apiController = APIController("super_cool_test_key", "gemini-pro", requestOptions, mockEngine) + CommonTestScope(channel, apiController).block() } -/** Simple wrapper that guarantees the model and APIController are created using the same data */ -internal fun createGenerativeModel( - name: String, - apikey: String, - requestOptions: RequestOptions = RequestOptions(), - engine: MockEngine -) = - GenerativeModel( - name, - apikey, - controller = APIController("super_cool_test_key", name, requestOptions, engine) - ) - /** * A variant of [commonTest] for performing *streaming-based* snapshot tests. * diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-api-key.txt b/common/src/test/resources/golden-files/streaming/failure-api-key.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-api-key.txt rename to common/src/test/resources/golden-files/streaming/failure-api-key.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-empty-content.txt b/common/src/test/resources/golden-files/streaming/failure-empty-content.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-empty-content.txt rename to common/src/test/resources/golden-files/streaming/failure-empty-content.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-finish-reason-safety.txt b/common/src/test/resources/golden-files/streaming/failure-finish-reason-safety.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-finish-reason-safety.txt rename to common/src/test/resources/golden-files/streaming/failure-finish-reason-safety.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-http-error.txt b/common/src/test/resources/golden-files/streaming/failure-http-error.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-http-error.txt rename to common/src/test/resources/golden-files/streaming/failure-http-error.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-image-rejected.txt b/common/src/test/resources/golden-files/streaming/failure-image-rejected.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-image-rejected.txt rename to common/src/test/resources/golden-files/streaming/failure-image-rejected.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-prompt-blocked-safety.txt b/common/src/test/resources/golden-files/streaming/failure-prompt-blocked-safety.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-prompt-blocked-safety.txt rename to common/src/test/resources/golden-files/streaming/failure-prompt-blocked-safety.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-recitation-no-content.txt b/common/src/test/resources/golden-files/streaming/failure-recitation-no-content.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-recitation-no-content.txt rename to common/src/test/resources/golden-files/streaming/failure-recitation-no-content.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/failure-unknown-model.txt b/common/src/test/resources/golden-files/streaming/failure-unknown-model.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/failure-unknown-model.txt rename to common/src/test/resources/golden-files/streaming/failure-unknown-model.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/success-basic-reply-long.txt b/common/src/test/resources/golden-files/streaming/success-basic-reply-long.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/success-basic-reply-long.txt rename to common/src/test/resources/golden-files/streaming/success-basic-reply-long.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/success-basic-reply-short.txt b/common/src/test/resources/golden-files/streaming/success-basic-reply-short.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/success-basic-reply-short.txt rename to common/src/test/resources/golden-files/streaming/success-basic-reply-short.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/success-citations-altname.txt b/common/src/test/resources/golden-files/streaming/success-citations-altname.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/success-citations-altname.txt rename to common/src/test/resources/golden-files/streaming/success-citations-altname.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/success-citations.txt b/common/src/test/resources/golden-files/streaming/success-citations.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/success-citations.txt rename to common/src/test/resources/golden-files/streaming/success-citations.txt diff --git a/generativeai/src/test/resources/golden-files/streaming/success-quotes-escaped.txt b/common/src/test/resources/golden-files/streaming/success-quotes-escaped.txt similarity index 64% rename from generativeai/src/test/resources/golden-files/streaming/success-quotes-escaped.txt rename to common/src/test/resources/golden-files/streaming/success-quotes-escaped.txt index 0c48e4c4..ef71be29 100644 --- a/generativeai/src/test/resources/golden-files/streaming/success-quotes-escaped.txt +++ b/common/src/test/resources/golden-files/streaming/success-quotes-escaped.txt @@ -1,4 +1,4 @@ -data: {"candidates": [{"content": {"parts": [{"text": " Pineapples and bananas are two different types of fruit. Pineapples grow on a"}]},"index": 0,"safetyRatings": [{"category": "HARM_CATEGORY_TOXICITY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_SEXUAL","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_VIOLENCE","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DEROGATORY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS","probability": "NEGLIGIBLE"}]}],"promptFeedback": {"safetyRatings": [{"category": "HARM_CATEGORY_TOXICITY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_SEXUAL","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_VIOLENCE","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DEROGATORY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS","probability": "NEGLIGIBLE"}]}} +data: {"candidates": [{"content": {"parts": [{"text": " Pineapples and \"bananas\" are two different types of fruit. Pineapples grow on a"}]},"index": 0,"safetyRatings": [{"category": "HARM_CATEGORY_TOXICITY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_SEXUAL","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_VIOLENCE","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DEROGATORY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS","probability": "NEGLIGIBLE"}]}],"promptFeedback": {"safetyRatings": [{"category": "HARM_CATEGORY_TOXICITY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_SEXUAL","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_VIOLENCE","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DEROGATORY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS","probability": "NEGLIGIBLE"}]}} data: {"candidates": [{"content": {"parts": [{"text": " tropical plant with a rosette of long, pointed leaves. Bananas grow on a herbaceous"}]},"index": 0,"safetyRatings": [{"category": "HARM_CATEGORY_TOXICITY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_SEXUAL","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_VIOLENCE","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DEROGATORY","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS","probability": "NEGLIGIBLE"}]}]} diff --git a/generativeai/src/test/resources/golden-files/streaming/success-unknown-enum.txt b/common/src/test/resources/golden-files/streaming/success-unknown-enum.txt similarity index 100% rename from generativeai/src/test/resources/golden-files/streaming/success-unknown-enum.txt rename to common/src/test/resources/golden-files/streaming/success-unknown-enum.txt diff --git a/generativeai/src/test/resources/golden-files/unary/failure-api-key.json b/common/src/test/resources/golden-files/unary/failure-api-key.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-api-key.json rename to common/src/test/resources/golden-files/unary/failure-api-key.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-empty-content.json b/common/src/test/resources/golden-files/unary/failure-empty-content.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-empty-content.json rename to common/src/test/resources/golden-files/unary/failure-empty-content.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-finish-reason-safety.json b/common/src/test/resources/golden-files/unary/failure-finish-reason-safety.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-finish-reason-safety.json rename to common/src/test/resources/golden-files/unary/failure-finish-reason-safety.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-http-error.json b/common/src/test/resources/golden-files/unary/failure-http-error.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-http-error.json rename to common/src/test/resources/golden-files/unary/failure-http-error.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-image-rejected.json b/common/src/test/resources/golden-files/unary/failure-image-rejected.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-image-rejected.json rename to common/src/test/resources/golden-files/unary/failure-image-rejected.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-invalid-response.json b/common/src/test/resources/golden-files/unary/failure-invalid-response.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-invalid-response.json rename to common/src/test/resources/golden-files/unary/failure-invalid-response.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-malformed-content.json b/common/src/test/resources/golden-files/unary/failure-malformed-content.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-malformed-content.json rename to common/src/test/resources/golden-files/unary/failure-malformed-content.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-prompt-blocked-safety.json b/common/src/test/resources/golden-files/unary/failure-prompt-blocked-safety.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-prompt-blocked-safety.json rename to common/src/test/resources/golden-files/unary/failure-prompt-blocked-safety.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-unknown-model.json b/common/src/test/resources/golden-files/unary/failure-unknown-model.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-unknown-model.json rename to common/src/test/resources/golden-files/unary/failure-unknown-model.json diff --git a/generativeai/src/test/resources/golden-files/unary/failure-unsupported-user-location.json b/common/src/test/resources/golden-files/unary/failure-unsupported-user-location.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/failure-unsupported-user-location.json rename to common/src/test/resources/golden-files/unary/failure-unsupported-user-location.json diff --git a/generativeai/src/test/resources/golden-files/unary/success-basic-reply-long.json b/common/src/test/resources/golden-files/unary/success-basic-reply-long.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/success-basic-reply-long.json rename to common/src/test/resources/golden-files/unary/success-basic-reply-long.json diff --git a/generativeai/src/test/resources/golden-files/unary/success-basic-reply-short.json b/common/src/test/resources/golden-files/unary/success-basic-reply-short.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/success-basic-reply-short.json rename to common/src/test/resources/golden-files/unary/success-basic-reply-short.json diff --git a/generativeai/src/test/resources/golden-files/unary/success-citations-altname.json b/common/src/test/resources/golden-files/unary/success-citations-altname.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/success-citations-altname.json rename to common/src/test/resources/golden-files/unary/success-citations-altname.json diff --git a/generativeai/src/test/resources/golden-files/unary/success-citations.json b/common/src/test/resources/golden-files/unary/success-citations.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/success-citations.json rename to common/src/test/resources/golden-files/unary/success-citations.json diff --git a/generativeai/src/test/resources/golden-files/unary/success-quote-reply.json b/common/src/test/resources/golden-files/unary/success-quote-reply.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/success-quote-reply.json rename to common/src/test/resources/golden-files/unary/success-quote-reply.json diff --git a/generativeai/src/test/resources/golden-files/unary/success-unknown-enum.json b/common/src/test/resources/golden-files/unary/success-unknown-enum.json similarity index 100% rename from generativeai/src/test/resources/golden-files/unary/success-unknown-enum.json rename to common/src/test/resources/golden-files/unary/success-unknown-enum.json diff --git a/generativeai/build.gradle.kts b/generativeai/build.gradle.kts index 39d5f72c..bac2aefa 100644 --- a/generativeai/build.gradle.kts +++ b/generativeai/build.gradle.kts @@ -73,15 +73,8 @@ android { } dependencies { - val ktorVersion = "2.3.2" + implementation(project(":common")) - implementation("io.ktor:ktor-client-okhttp:$ktorVersion") - implementation("io.ktor:ktor-client-core:$ktorVersion") - implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion") - implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") - implementation("io.ktor:ktor-client-logging:$ktorVersion") - - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1") implementation("androidx.core:core-ktx:1.12.0") implementation("org.slf4j:slf4j-nop:2.0.9") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") @@ -92,10 +85,9 @@ dependencies { implementation("androidx.concurrent:concurrent-futures:1.2.0-alpha02") implementation("androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha02") testImplementation("junit:junit:4.13.2") - testImplementation("io.kotest:kotest-assertions-core:4.0.7") - testImplementation("io.kotest:kotest-assertions-jvm:4.0.7") - testImplementation("io.kotest:kotest-assertions-json:4.0.7") - testImplementation("io.ktor:ktor-client-mock:$ktorVersion") + testImplementation("io.kotest:kotest-assertions-core:5.5.5") + testImplementation("io.kotest:kotest-assertions-core-jvm:5.5.5") + testImplementation("io.mockk:mockk:1.13.10") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt index 77c86cce..690f5be4 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt @@ -17,9 +17,9 @@ package com.google.ai.client.generativeai import android.graphics.Bitmap -import com.google.ai.client.generativeai.internal.api.APIController -import com.google.ai.client.generativeai.internal.api.CountTokensRequest -import com.google.ai.client.generativeai.internal.api.GenerateContentRequest +import com.google.ai.client.generativeai.common.APIController +import com.google.ai.client.generativeai.common.CountTokensRequest +import com.google.ai.client.generativeai.common.GenerateContentRequest import com.google.ai.client.generativeai.internal.util.toInternal import com.google.ai.client.generativeai.internal.util.toPublic import com.google.ai.client.generativeai.type.Content @@ -71,7 +71,7 @@ internal constructor( generationConfig, safetySettings, requestOptions, - APIController(apiKey, modelName, requestOptions) + APIController(apiKey, modelName, requestOptions.toInternal()) ) /** @@ -97,8 +97,8 @@ internal constructor( fun generateContentStream(vararg prompt: Content): Flow = controller .generateContentStream(constructRequest(*prompt)) - .map { it.toPublic().validate() } .catch { throw GoogleGenerativeAIException.from(it) } + .map { it.toPublic().validate() } /** * Generates a response from the backend with the provided text represented [Content]. diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt index df0d5285..e4b236b7 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt @@ -19,24 +19,25 @@ package com.google.ai.client.generativeai.internal.util import android.graphics.Bitmap import android.graphics.BitmapFactory import android.util.Base64 -import com.google.ai.client.generativeai.internal.api.CountTokensResponse -import com.google.ai.client.generativeai.internal.api.GenerateContentResponse -import com.google.ai.client.generativeai.internal.api.client.GenerationConfig -import com.google.ai.client.generativeai.internal.api.server.BlockReason -import com.google.ai.client.generativeai.internal.api.server.Candidate -import com.google.ai.client.generativeai.internal.api.server.CitationSources -import com.google.ai.client.generativeai.internal.api.server.FinishReason -import com.google.ai.client.generativeai.internal.api.server.HarmProbability -import com.google.ai.client.generativeai.internal.api.server.PromptFeedback -import com.google.ai.client.generativeai.internal.api.server.SafetyRating -import com.google.ai.client.generativeai.internal.api.shared.Blob -import com.google.ai.client.generativeai.internal.api.shared.BlobPart -import com.google.ai.client.generativeai.internal.api.shared.Content -import com.google.ai.client.generativeai.internal.api.shared.HarmBlockThreshold -import com.google.ai.client.generativeai.internal.api.shared.HarmCategory -import com.google.ai.client.generativeai.internal.api.shared.Part -import com.google.ai.client.generativeai.internal.api.shared.SafetySetting -import com.google.ai.client.generativeai.internal.api.shared.TextPart +import com.google.ai.client.generativeai.common.CountTokensResponse +import com.google.ai.client.generativeai.common.GenerateContentResponse +import com.google.ai.client.generativeai.common.RequestOptions +import com.google.ai.client.generativeai.common.client.GenerationConfig +import com.google.ai.client.generativeai.common.server.BlockReason +import com.google.ai.client.generativeai.common.server.Candidate +import com.google.ai.client.generativeai.common.server.CitationSources +import com.google.ai.client.generativeai.common.server.FinishReason +import com.google.ai.client.generativeai.common.server.HarmProbability +import com.google.ai.client.generativeai.common.server.PromptFeedback +import com.google.ai.client.generativeai.common.server.SafetyRating +import com.google.ai.client.generativeai.common.shared.Blob +import com.google.ai.client.generativeai.common.shared.BlobPart +import com.google.ai.client.generativeai.common.shared.Content +import com.google.ai.client.generativeai.common.shared.HarmBlockThreshold +import com.google.ai.client.generativeai.common.shared.HarmCategory +import com.google.ai.client.generativeai.common.shared.Part +import com.google.ai.client.generativeai.common.shared.SafetySetting +import com.google.ai.client.generativeai.common.shared.TextPart import com.google.ai.client.generativeai.type.BlockThreshold import com.google.ai.client.generativeai.type.CitationMetadata import com.google.ai.client.generativeai.type.ImagePart @@ -46,6 +47,9 @@ import java.io.ByteArrayOutputStream private const val BASE_64_FLAGS = Base64.NO_WRAP +internal fun com.google.ai.client.generativeai.type.RequestOptions.toInternal() = + RequestOptions(timeout, apiVersion) + internal fun com.google.ai.client.generativeai.type.Content.toInternal() = Content(this.role, this.parts.map { it.toInternal() }) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt index 5b451f01..5cfc197e 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt @@ -17,12 +17,13 @@ package com.google.ai.client.generativeai.type import com.google.ai.client.generativeai.GenerativeModel -import io.ktor.serialization.JsonConvertException +import com.google.ai.client.generativeai.internal.util.toPublic import kotlinx.coroutines.TimeoutCancellationException /** Parent class for any errors that occur from [GenerativeModel]. */ sealed class GoogleGenerativeAIException(message: String, cause: Throwable? = null) : RuntimeException(message, cause) { + companion object { /** @@ -34,12 +35,30 @@ sealed class GoogleGenerativeAIException(message: String, cause: Throwable? = nu fun from(cause: Throwable): GoogleGenerativeAIException = when (cause) { is GoogleGenerativeAIException -> cause - is JsonConvertException, - is kotlinx.serialization.SerializationException -> - SerializationException( - "Something went wrong while trying to deserialize a response from the server.", - cause - ) + is com.google.ai.client.generativeai.common.GoogleGenerativeAIException -> + when (cause) { + is com.google.ai.client.generativeai.common.SerializationException -> + SerializationException(cause.message ?: "", cause.cause) + is com.google.ai.client.generativeai.common.ServerException -> + ServerException(cause.message ?: "", cause.cause) + is com.google.ai.client.generativeai.common.InvalidAPIKeyException -> + InvalidAPIKeyException( + cause.message ?: "", + ) + is com.google.ai.client.generativeai.common.PromptBlockedException -> + PromptBlockedException(cause.response.toPublic(), cause.cause) + is com.google.ai.client.generativeai.common.UnsupportedUserLocationException -> + UnsupportedUserLocationException(cause.cause) + is com.google.ai.client.generativeai.common.InvalidStateException -> + InvalidStateException(cause.message ?: "", cause) + is com.google.ai.client.generativeai.common.ResponseStoppedException -> + ResponseStoppedException(cause.response.toPublic(), cause.cause) + is com.google.ai.client.generativeai.common.RequestTimeoutException -> + RequestTimeoutException(cause.message ?: "", cause.cause) + is com.google.ai.client.generativeai.common.UnknownException -> + UnknownException(cause.message ?: "", cause.cause) + else -> UnknownException(cause.message ?: "", cause) + } is TimeoutCancellationException -> RequestTimeoutException("The request failed to complete in the allotted time.") else -> UnknownException("Something unexpected happened.", cause) @@ -66,6 +85,7 @@ class InvalidAPIKeyException(message: String, cause: Throwable? = null) : * * @property response the full server response for the request. */ +// TODO(rlazo): Add secondary constructor to pass through the message? class PromptBlockedException(val response: GenerateContentResponse, cause: Throwable? = null) : GoogleGenerativeAIException( "Prompt was blocked: ${response.promptFeedback?.blockReason?.name}", @@ -79,6 +99,7 @@ class PromptBlockedException(val response: GenerateContentResponse, cause: Throw * [list of regions](https://ai.google.dev/available_regions#available_regions) (countries and * territories) where the API is available. */ +// TODO(rlazo): Add secondary constructor to pass through the message? class UnsupportedUserLocationException(cause: Throwable? = null) : GoogleGenerativeAIException("User location is not supported for the API use.", cause) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt index cc9669d9..e25561fb 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt @@ -16,7 +16,6 @@ package com.google.ai.client.generativeai.type -import io.ktor.client.plugins.HttpTimeout import kotlin.time.Duration import kotlin.time.DurationUnit import kotlin.time.toDuration @@ -31,10 +30,7 @@ import kotlin.time.toDuration class RequestOptions(val timeout: Duration, val apiVersion: String = "v1") { @JvmOverloads constructor( - timeout: Long? = HttpTimeout.INFINITE_TIMEOUT_MS, + timeout: Long? = Long.MAX_VALUE, apiVersion: String = "v1" - ) : this( - (timeout ?: HttpTimeout.INFINITE_TIMEOUT_MS).toDuration(DurationUnit.MILLISECONDS), - apiVersion - ) + ) : this((timeout ?: Long.MAX_VALUE).toDuration(DurationUnit.MILLISECONDS), apiVersion) } diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt b/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt index 15145389..bfc0b24c 100644 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt +++ b/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt @@ -16,91 +16,119 @@ package com.google.ai.client.generativeai -import com.google.ai.client.generativeai.type.RequestOptions -import com.google.ai.client.generativeai.type.RequestTimeoutException -import com.google.ai.client.generativeai.util.commonTest -import com.google.ai.client.generativeai.util.createGenerativeModel -import com.google.ai.client.generativeai.util.createResponses -import com.google.ai.client.generativeai.util.doBlocking -import com.google.ai.client.generativeai.util.prepareStreamingResponse +import com.google.ai.client.generativeai.common.APIController +import com.google.ai.client.generativeai.common.GenerateContentRequest as GenerateContentRequest_Common +import com.google.ai.client.generativeai.common.GenerateContentResponse as GenerateContentResponse_Common +import com.google.ai.client.generativeai.common.InvalidAPIKeyException as InvalidAPIKeyException_Common +import com.google.ai.client.generativeai.common.UnsupportedUserLocationException as UnsupportedUserLocationException_Common +import com.google.ai.client.generativeai.common.server.Candidate as Candidate_Common +import com.google.ai.client.generativeai.common.shared.Content as Content_Common +import com.google.ai.client.generativeai.common.shared.TextPart as TextPart_Common +import com.google.ai.client.generativeai.type.Candidate +import com.google.ai.client.generativeai.type.Content +import com.google.ai.client.generativeai.type.GenerateContentResponse +import com.google.ai.client.generativeai.type.InvalidAPIKeyException +import com.google.ai.client.generativeai.type.PromptFeedback +import com.google.ai.client.generativeai.type.TextPart +import com.google.ai.client.generativeai.type.UnsupportedUserLocationException import io.kotest.assertions.throwables.shouldThrow -import io.kotest.matchers.shouldBe -import io.kotest.matchers.string.shouldContain -import io.ktor.client.engine.mock.MockEngine -import io.ktor.client.engine.mock.respond -import io.ktor.http.HttpHeaders -import io.ktor.http.HttpStatusCode -import io.ktor.http.headersOf -import io.ktor.utils.io.ByteChannel -import io.ktor.utils.io.close -import io.ktor.utils.io.writeFully -import kotlin.time.Duration.Companion.seconds -import kotlinx.coroutines.withTimeout +import io.kotest.matchers.collections.shouldHaveSize +import io.kotest.matchers.equality.shouldBeEqualToUsingFields +import io.mockk.coEvery +import io.mockk.mockk +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.flow.flow +import kotlinx.coroutines.runBlocking import org.junit.Test -import org.junit.runner.RunWith -import org.junit.runners.Parameterized internal class GenerativeModelTests { - private val testTimeout = 5.seconds + + private val apiKey: String = "api_key" + private val mockApiController = mockk() @Test - fun `(generateContentStream) emits responses as they come in`() = commonTest { - val response = createResponses("The", " world", " is", " a", " beautiful", " place!") - val bytes = prepareStreamingResponse(response) + fun `generateContent request succeeds`() = doBlocking { + val model = GenerativeModel("gemini-pro-1.0", apiKey, controller = mockApiController) + coEvery { + mockApiController.generateContent( + GenerateContentRequest_Common( + "gemini-pro-1.0", + contents = listOf(Content_Common(parts = listOf(TextPart_Common("Why's the sky blue?")))) + ) + ) + } returns + GenerateContentResponse_Common( + listOf( + Candidate_Common( + content = + Content_Common( + parts = listOf(TextPart_Common("I'm still learning how to answer this question")) + ), + finishReason = null, + safetyRatings = listOf(), + citationMetadata = null + ) + ) + ) + + val expectedResponse = + GenerateContentResponse( + listOf( + Candidate( + Content(parts = listOf(TextPart("I'm still learning how to answer this question"))), + safetyRatings = listOf(), + citationMetadata = listOf(), + finishReason = null + ) + ), + PromptFeedback(null, listOf()) + ) - bytes.forEach { channel.writeFully(it) } - val responses = model.generateContentStream() + val response = model.generateContent("Why's the sky blue?") - withTimeout(testTimeout) { - responses.collect { - it.candidates.isEmpty() shouldBe false - channel.close() - } - } + response.shouldBeEqualToUsingFields(expectedResponse, GenerateContentResponse::text) + response.candidates shouldHaveSize expectedResponse.candidates.size + response.candidates[0].shouldBeEqualToUsingFields( + expectedResponse.candidates[0], + Candidate::finishReason, + Candidate::citationMetadata, + Candidate::safetyRatings + ) } @Test - fun `(generateContent) respects a custom timeout`() = - commonTest(requestOptions = RequestOptions(2.seconds)) { - shouldThrow { - withTimeout(testTimeout) { model.generateContent("d") } - } - } -} + fun `generateContent throws exception`() = doBlocking { + val model = GenerativeModel("gemini-pro-1.0", apiKey, controller = mockApiController) + coEvery { + mockApiController.generateContent( + GenerateContentRequest_Common( + "gemini-pro-1.0", + contents = listOf(Content_Common(parts = listOf(TextPart_Common("Why's the sky blue?")))) + ) + ) + } throws InvalidAPIKeyException_Common("exception message") -@RunWith(Parameterized::class) -internal class ModelNamingTests(private val modelName: String, private val actualName: String) { + shouldThrow { model.generateContent("Why's the sky blue?") } + } @Test - fun `request should include right model name`() = doBlocking { - val channel = ByteChannel(autoFlush = true) - val mockEngine = MockEngine { - respond(channel, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) - } - prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } - val model = - createGenerativeModel(modelName, "super_cool_test_key", RequestOptions(), mockEngine) + fun `generateContentStream throws exception`() = doBlocking { + val model = GenerativeModel("gemini-pro-1.0", apiKey, controller = mockApiController) + coEvery { + mockApiController.generateContentStream( + GenerateContentRequest_Common( + "gemini-pro-1.0", + contents = listOf(Content_Common(parts = listOf(TextPart_Common("Why's the sky blue?")))) + ) + ) + } returns flow { throw UnsupportedUserLocationException_Common() } - withTimeout(5.seconds) { - model.generateContentStream().collect { - it.candidates.isEmpty() shouldBe false - channel.close() - } + shouldThrow { + model.generateContentStream("Why's the sky blue?").collect {} } - - mockEngine.requestHistory.first().url.encodedPath shouldContain actualName } +} - companion object { - @JvmStatic - @Parameterized.Parameters - fun data() = - listOf( - arrayOf("gemini-pro", "models/gemini-pro"), - arrayOf("x/gemini-pro", "x/gemini-pro"), - arrayOf("models/gemini-pro", "models/gemini-pro"), - arrayOf("/modelname", "/modelname"), - arrayOf("modifiedNaming/mymodel", "modifiedNaming/mymodel"), - ) - } +internal fun doBlocking(block: suspend CoroutineScope.() -> Unit) { + runBlocking(block = block) } diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/UnarySnapshotTests.kt b/generativeai/src/test/java/com/google/ai/client/generativeai/UnarySnapshotTests.kt deleted file mode 100644 index 3c15a9e5..00000000 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/UnarySnapshotTests.kt +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.client.generativeai - -import com.google.ai.client.generativeai.type.BlockReason -import com.google.ai.client.generativeai.type.FinishReason -import com.google.ai.client.generativeai.type.HarmCategory -import com.google.ai.client.generativeai.type.InvalidAPIKeyException -import com.google.ai.client.generativeai.type.PromptBlockedException -import com.google.ai.client.generativeai.type.ResponseStoppedException -import com.google.ai.client.generativeai.type.SerializationException -import com.google.ai.client.generativeai.type.ServerException -import com.google.ai.client.generativeai.type.UnsupportedUserLocationException -import com.google.ai.client.generativeai.util.goldenUnaryFile -import io.kotest.assertions.throwables.shouldThrow -import io.kotest.matchers.should -import io.kotest.matchers.shouldBe -import io.ktor.http.HttpStatusCode -import kotlin.time.Duration.Companion.seconds -import kotlinx.coroutines.withTimeout -import org.junit.Test - -internal class UnarySnapshotTests { - private val testTimeout = 5.seconds - - @Test - fun `short reply`() = - goldenUnaryFile("success-basic-reply-short.json") { - withTimeout(testTimeout) { - val response = model.generateContent() - - response.candidates.isEmpty() shouldBe false - response.candidates.first().finishReason shouldBe FinishReason.STOP - response.candidates.first().content.parts.isEmpty() shouldBe false - response.candidates.first().safetyRatings.isEmpty() shouldBe false - } - } - - @Test - fun `long reply`() = - goldenUnaryFile("success-basic-reply-long.json") { - withTimeout(testTimeout) { - val response = model.generateContent() - - response.candidates.isEmpty() shouldBe false - response.candidates.first().finishReason shouldBe FinishReason.STOP - response.candidates.first().content.parts.isEmpty() shouldBe false - response.candidates.first().safetyRatings.isEmpty() shouldBe false - } - } - - @Test - fun `unknown enum`() = - goldenUnaryFile("success-unknown-enum.json") { - withTimeout(testTimeout) { - val response = model.generateContent() - - response.candidates.first { it.safetyRatings.any { it.category == HarmCategory.UNKNOWN } } - } - } - - @Test - fun `prompt blocked for safety`() = - goldenUnaryFile("failure-prompt-blocked-safety.json") { - withTimeout(testTimeout) { - shouldThrow { model.generateContent() } should - { - it.response.promptFeedback?.blockReason shouldBe BlockReason.SAFETY - } - } - } - - @Test - fun `empty content`() = - goldenUnaryFile("failure-empty-content.json") { - withTimeout(testTimeout) { shouldThrow { model.generateContent() } } - } - - @Test - fun `http error`() = - goldenUnaryFile("failure-http-error.json", HttpStatusCode.PreconditionFailed) { - withTimeout(testTimeout) { shouldThrow { model.generateContent() } } - } - - @Test - fun `user location error`() = - goldenUnaryFile("failure-unsupported-user-location.json", HttpStatusCode.PreconditionFailed) { - withTimeout(testTimeout) { - shouldThrow { model.generateContent() } - } - } - - @Test - fun `stopped for safety`() = - goldenUnaryFile("failure-finish-reason-safety.json") { - withTimeout(testTimeout) { - val exception = shouldThrow { model.generateContent() } - exception.response.candidates.first().finishReason shouldBe FinishReason.SAFETY - } - } - - @Test - fun `citation returns correctly`() = - goldenUnaryFile("success-citations.json") { - withTimeout(testTimeout) { - val response = model.generateContent() - - response.candidates.isEmpty() shouldBe false - response.candidates.first().citationMetadata.isNotEmpty() shouldBe true - } - } - - @Test - fun `citation returns correctly when using alternative name`() = - goldenUnaryFile("success-citations-altname.json") { - withTimeout(testTimeout) { - val response = model.generateContent() - - response.candidates.isEmpty() shouldBe false - response.candidates.first().citationMetadata.isNotEmpty() shouldBe true - } - } - - @Test - fun `invalid response`() = - goldenUnaryFile("failure-invalid-response.json") { - withTimeout(testTimeout) { shouldThrow { model.generateContent() } } - } - - @Test - fun `malformed content`() = - goldenUnaryFile("failure-malformed-content.json") { - withTimeout(testTimeout) { shouldThrow { model.generateContent() } } - } - - @Test - fun `invalid api key`() = - goldenUnaryFile("failure-api-key.json", HttpStatusCode.BadRequest) { - withTimeout(testTimeout) { shouldThrow { model.generateContent() } } - } - - @Test - fun `image rejected`() = - goldenUnaryFile("failure-image-rejected.json", HttpStatusCode.BadRequest) { - withTimeout(testTimeout) { shouldThrow { model.generateContent() } } - } - - @Test - fun `unknown model`() = - goldenUnaryFile("failure-unknown-model.json", HttpStatusCode.NotFound) { - withTimeout(testTimeout) { shouldThrow { model.generateContent() } } - } -} diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/internal/util/ConversionsTest.kt b/generativeai/src/test/java/com/google/ai/client/generativeai/internal/util/ConversionsTest.kt deleted file mode 100644 index 31255fbe..00000000 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/internal/util/ConversionsTest.kt +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.client.generativeai.internal.util - -import com.google.ai.client.generativeai.internal.api.shared.Content -import com.google.ai.client.generativeai.internal.api.shared.TextPart -import com.google.ai.client.generativeai.type.content -import io.kotest.matchers.shouldBe -import org.junit.Test - -class ConversionsTest { - - @Test - fun `test content conversion toInternal (role not mentioned)`() { - val content = content { text("test") }.toInternal() - content.run { - // default role should be a "user" - role shouldBe "user" - - // only one part should be present - parts.size shouldBe 1 - parts[0].run { (this as TextPart).text shouldBe "test" } - } - } - - @Test - fun `test content conversion toInternal (role mentioned)`() { - val content = content(role = "model") { text("test") }.toInternal() - content.run { - // Role should be a "model" - role shouldBe "model" - - // only one part should be present - parts.size shouldBe 1 - parts[0].run { (this as TextPart).text shouldBe "test" } - } - } - - @Test - fun `test content conversion toPublic (role not mentioned)`() { - val content = Content(parts = listOf(TextPart("test"))).toPublic() - content.role shouldBe "user" - } - - @Test - fun `test content conversion toPublic (role mentioned)`() { - val content = Content(role = "model", parts = listOf(TextPart("test"))).toPublic() - content.role shouldBe "model" - } -} diff --git a/settings.gradle.kts b/settings.gradle.kts index 44f363aa..3f4e53af 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -31,4 +31,5 @@ dependencyResolutionManagement { rootProject.name = "generativeai" include(":generativeai") +include(":common") includeBuild("./plugins") From 4638406a286555de3f7d1581d6da77af3d5f66ed Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 20 Mar 2024 16:20:01 -0400 Subject: [PATCH 03/41] Expand RequestOptions class in common (#89) --- .../generativeai/common/APIController.kt | 8 ++- .../generativeai/common/RequestOptions.kt | 12 +++-- ...iveModelTests.kt => APIControllerTests.kt} | 49 ++++++++++++++++++- 3 files changed, 60 insertions(+), 9 deletions(-) rename common/src/test/java/com/google/ai/client/generativeai/common/{GenerativeModelTests.kt => APIControllerTests.kt} (70%) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt index 13cfccc2..757554ce 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt @@ -45,8 +45,6 @@ import kotlinx.coroutines.flow.timeout import kotlinx.coroutines.launch import kotlinx.serialization.json.Json -const val DOMAIN = "https://generativelanguage.googleapis.com" - val JSON = Json { ignoreUnknownKeys = true prettyPrint = false @@ -90,7 +88,7 @@ internal constructor( suspend fun generateContent(request: GenerateContentRequest): GenerateContentResponse = try { client - .post("$DOMAIN/${requestOptions.apiVersion}/$model:generateContent") { + .post("${requestOptions.endpoint}/${requestOptions.apiVersion}/$model:generateContent") { applyCommonConfiguration(request) } .also { validateResponse(it) } @@ -103,7 +101,7 @@ internal constructor( fun generateContentStream(request: GenerateContentRequest): Flow = client .postStream( - "$DOMAIN/${requestOptions.apiVersion}/$model:streamGenerateContent?alt=sse" + "${requestOptions.endpoint}/${requestOptions.apiVersion}/$model:streamGenerateContent?alt=sse" ) { applyCommonConfiguration(request) } @@ -113,7 +111,7 @@ internal constructor( suspend fun countTokens(request: CountTokensRequest): CountTokensResponse = try { client - .post("$DOMAIN/${requestOptions.apiVersion}/$model:countTokens") { + .post("${requestOptions.endpoint}/${requestOptions.apiVersion}/$model:countTokens") { applyCommonConfiguration(request) } .also { validateResponse(it) } diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt index 82ea8842..4decb5c1 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt @@ -28,13 +28,19 @@ import kotlin.time.toDuration * first response. * @property apiVersion the api endpoint to call. */ -class RequestOptions(val timeout: Duration, val apiVersion: String = "v1") { +class RequestOptions( + val timeout: Duration, + val apiVersion: String = "v1", + val endpoint: String = "https://generativelanguage.googleapis.com" +) { @JvmOverloads constructor( timeout: Long? = HttpTimeout.INFINITE_TIMEOUT_MS, - apiVersion: String = "v1" + apiVersion: String = "v1", + endpoint: String = "https://generativelanguage.googleapis.com" ) : this( (timeout ?: HttpTimeout.INFINITE_TIMEOUT_MS).toDuration(DurationUnit.MILLISECONDS), - apiVersion + apiVersion, + endpoint ) } diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/GenerativeModelTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt similarity index 70% rename from common/src/test/java/com/google/ai/client/generativeai/common/GenerativeModelTests.kt rename to common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt index 6269b673..a05d6d67 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/GenerativeModelTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt @@ -39,7 +39,7 @@ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized -internal class GenerativeModelTests { +internal class APIControllerTests { private val testTimeout = 5.seconds @Test @@ -69,6 +69,53 @@ internal class GenerativeModelTests { } } +internal class EndpointTests { + @Test + fun `using default endpoint`() = doBlocking { + val channel = ByteChannel(autoFlush = true) + val mockEngine = MockEngine { + respond(channel, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } + val controller = + APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + + withTimeout(5.seconds) { + controller.generateContentStream(textGenerateContentRequest("cats")).collect { + it.candidates?.isEmpty() shouldBe false + channel.close() + } + } + + mockEngine.requestHistory.first().url.host shouldBe "generativelanguage.googleapis.com" + } + + @Test + fun `using custom endpoint`() = doBlocking { + val channel = ByteChannel(autoFlush = true) + val mockEngine = MockEngine { + respond(channel, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } + val controller = + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(endpoint = "https://my.custom.endpoint"), + mockEngine + ) + + withTimeout(5.seconds) { + controller.generateContentStream(textGenerateContentRequest("cats")).collect { + it.candidates?.isEmpty() shouldBe false + channel.close() + } + } + + mockEngine.requestHistory.first().url.host shouldBe "my.custom.endpoint" + } +} + @RunWith(Parameterized::class) internal class ModelNamingTests(private val modelName: String, private val actualName: String) { From b2afc5587438c5d597fd59228893e3c29b51c697 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Fri, 22 Mar 2024 12:07:25 -0400 Subject: [PATCH 04/41] Add support for usage metadata (#91) --- .../ai/client/generativeai/common/Response.kt | 8 +++ .../generativeai/common/UnarySnapshotTests.kt | 14 +++++ .../unary/success-usage-metadata.json | 59 +++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 common/src/test/resources/golden-files/unary/success-usage-metadata.json diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt index c8801e37..6f0016ad 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt @@ -27,8 +27,16 @@ sealed interface Response data class GenerateContentResponse( val candidates: List? = null, val promptFeedback: PromptFeedback? = null, + val usageMetadata: UsageMetadata? = null ) : Response @Serializable data class CountTokensResponse(val totalTokens: Int) : Response @Serializable data class GRpcErrorResponse(val error: GRpcError) : Response + +@Serializable +data class UsageMetadata( + val promptTokenCount: Int, + val candidatesTokenCount: Int, + val totalTokenCount: Int +) diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt index a05284da..ac4b9750 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt @@ -23,6 +23,7 @@ import com.google.ai.client.generativeai.common.util.goldenUnaryFile import io.kotest.assertions.throwables.shouldThrow import io.kotest.matchers.should import io.kotest.matchers.shouldBe +import io.kotest.matchers.shouldNotBe import io.ktor.http.HttpStatusCode import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.withTimeout @@ -132,6 +133,19 @@ internal class UnarySnapshotTests { } } + @Test + fun `response includes usage metadata`() = + goldenUnaryFile("success-usage-metadata.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.finishReason shouldBe FinishReason.STOP + response.usageMetadata shouldNotBe null + response.usageMetadata?.totalTokenCount shouldBe 363 + } + } + @Test fun `citation returns correctly when using alternative name`() = goldenUnaryFile("success-citations-altname.json") { diff --git a/common/src/test/resources/golden-files/unary/success-usage-metadata.json b/common/src/test/resources/golden-files/unary/success-usage-metadata.json new file mode 100644 index 00000000..77efea8f --- /dev/null +++ b/common/src/test/resources/golden-files/unary/success-usage-metadata.json @@ -0,0 +1,59 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Mountain View, California, United States" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "safetyRatings": [ + { + "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HATE_SPEECH", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_DANGEROUS_CONTENT", + "probability": "NEGLIGIBLE" + } + ] + } + ], + "usageMetadata": { + "promptTokenCount": 6, + "candidatesTokenCount": 357, + "totalTokenCount": 363 + }, + "promptFeedback": { + "safetyRatings": [ + { + "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HATE_SPEECH", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_DANGEROUS_CONTENT", + "probability": "NEGLIGIBLE" + } + ] + } +} From 672f0a44e678a891c447baf2de04db1d22fef901 Mon Sep 17 00:00:00 2001 From: Daymon <17409137+daymxn@users.noreply.github.com> Date: Fri, 22 Mar 2024 14:54:58 -0500 Subject: [PATCH 05/41] Add support for FileData (#92) Per [b/330773378](https://b.corp.google.com/issues/330773378), This adds support for the new `FileData` part type for referencing storage files. This also adds "support" from the genai side, as a means of catching future api discrepancies between common and genai. --- .changes/crowd-birthday-drink-circle.json | 1 + .../ai/client/generativeai/common/shared/Types.kt | 11 ++++++++++- .../client/generativeai/internal/util/conversions.kt | 4 ++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 .changes/crowd-birthday-drink-circle.json diff --git a/.changes/crowd-birthday-drink-circle.json b/.changes/crowd-birthday-drink-circle.json new file mode 100644 index 00000000..a78ade04 --- /dev/null +++ b/.changes/crowd-birthday-drink-circle.json @@ -0,0 +1 @@ +{"type":"PATCH","changes":["Implement error catching for unsupported Part types."]} diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt index 8fc641be..b14b8985 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt @@ -52,6 +52,14 @@ data class Content(@EncodeDefault val role: String? = "user", val parts: List(Part::class) { val jsonObject = element.jsonObject return when { "text" in jsonObject -> TextPart.serializer() - "inlineData" in jsonObject -> BlobPart.serializer() + "inline_data" in jsonObject -> BlobPart.serializer() + "file_data" in jsonObject -> FileDataPart.serializer() else -> throw SerializationException("Unknown Part type") } } diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt index e4b236b7..5abf8509 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt @@ -126,6 +126,10 @@ internal fun Part.toPublic(): com.google.ai.client.generativeai.type.Part { com.google.ai.client.generativeai.type.BlobPart(inlineData.mimeType, data) } } + else -> + throw SerializationException( + "Unsupported part type \"${javaClass.simpleName}\" provided. This model may not be supported by this SDK." + ) } } From 47135cf17ece1c3a7cd99b3ffdf62be4e85034e8 Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Mon, 25 Mar 2024 17:39:46 +0000 Subject: [PATCH 06/41] added quota exceeded exception (#93) Co-authored-by: David Motsonashvili Co-authored-by: Rodrigo Lazo --- .../generativeai/common/APIController.kt | 3 ++ .../client/generativeai/common/Exceptions.kt | 10 ++++-- .../generativeai/common/UnarySnapshotTests.kt | 10 ++++++ .../unary/failure-quota-exceeded.json | 31 +++++++++++++++++++ .../ai/client/generativeai/type/Exceptions.kt | 14 ++++++--- 5 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 common/src/test/resources/golden-files/unary/failure-quota-exceeded.json diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt index 757554ce..e9cbae41 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt @@ -198,6 +198,9 @@ private suspend fun validateResponse(response: HttpResponse) { if (message == "User location is not supported for the API use.") { throw UnsupportedUserLocationException() } + if (message.contains("quota")) { + throw QuotaExceededException(message) + } throw ServerException(message) } diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt index d28ea2ff..491b8cb4 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt @@ -37,7 +37,7 @@ sealed class GoogleGenerativeAIException(message: String, cause: Throwable? = nu is kotlinx.serialization.SerializationException -> SerializationException( "Something went wrong while trying to deserialize a response from the server.", - cause + cause, ) is TimeoutCancellationException -> RequestTimeoutException("The request failed to complete in the allotted time.") @@ -68,7 +68,7 @@ class InvalidAPIKeyException(message: String, cause: Throwable? = null) : class PromptBlockedException(val response: GenerateContentResponse, cause: Throwable? = null) : GoogleGenerativeAIException( "Prompt was blocked: ${response.promptFeedback?.blockReason?.name}", - cause + cause, ) /** @@ -97,7 +97,7 @@ class InvalidStateException(message: String, cause: Throwable? = null) : class ResponseStoppedException(val response: GenerateContentResponse, cause: Throwable? = null) : GoogleGenerativeAIException( "Content generation stopped. Reason: ${response.candidates?.first()?.finishReason?.name}", - cause + cause, ) /** @@ -108,6 +108,10 @@ class ResponseStoppedException(val response: GenerateContentResponse, cause: Thr class RequestTimeoutException(message: String, cause: Throwable? = null) : GoogleGenerativeAIException(message, cause) +/** The quota for this API key is depleted, retry this request at a later time. */ +class QuotaExceededException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) + /** Catch all case for exceptions not explicitly expected. */ class UnknownException(message: String, cause: Throwable? = null) : GoogleGenerativeAIException(message, cause) diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt index ac4b9750..606986c4 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt @@ -187,6 +187,16 @@ internal class UnarySnapshotTests { } } + @Test + fun `quota exceeded`() = + goldenUnaryFile("failure-quota-exceeded.json", HttpStatusCode.BadRequest) { + withTimeout(testTimeout) { + shouldThrow { + apiController.generateContent(textGenerateContentRequest("prompt")) + } + } + } + @Test fun `image rejected`() = goldenUnaryFile("failure-image-rejected.json", HttpStatusCode.BadRequest) { diff --git a/common/src/test/resources/golden-files/unary/failure-quota-exceeded.json b/common/src/test/resources/golden-files/unary/failure-quota-exceeded.json new file mode 100644 index 00000000..fc438f7b --- /dev/null +++ b/common/src/test/resources/golden-files/unary/failure-quota-exceeded.json @@ -0,0 +1,31 @@ +{ + "error": { + "code": 429, + "message": "Quota exceeded for quota metric 'Generate Content API requests per minute' and limit 'GenerateContent request limit per minute for a region' of service 'generativelanguage.googleapis.com' for consumer 'project_number:348715329010'.", + "status": "RESOURCE_EXHAUSTED", + "details": [ + { + "@type": "type.googleapis.com/google.rpc.ErrorInfo", + "reason": "RATE_LIMIT_EXCEEDED", + "domain": "googleapis.com", + "metadata": { + "service": "generativelanguage.googleapis.com", + "consumer": "projects/348715329010", + "quota_limit_value": "0", + "quota_limit": "GenerateContentRequestsPerMinutePerProjectPerRegion", + "quota_location": "us-east2", + "quota_metric": "generativelanguage.googleapis.com/generate_content_requests" + } + }, + { + "@type": "type.googleapis.com/google.rpc.Help", + "links": [ + { + "description": "Request a higher quota limit.", + "url": "https://cloud.google.com/docs/quota#requesting_higher_quota" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt index 5cfc197e..cc64c6c6 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Exceptions.kt @@ -42,9 +42,7 @@ sealed class GoogleGenerativeAIException(message: String, cause: Throwable? = nu is com.google.ai.client.generativeai.common.ServerException -> ServerException(cause.message ?: "", cause.cause) is com.google.ai.client.generativeai.common.InvalidAPIKeyException -> - InvalidAPIKeyException( - cause.message ?: "", - ) + InvalidAPIKeyException(cause.message ?: "") is com.google.ai.client.generativeai.common.PromptBlockedException -> PromptBlockedException(cause.response.toPublic(), cause.cause) is com.google.ai.client.generativeai.common.UnsupportedUserLocationException -> @@ -57,6 +55,8 @@ sealed class GoogleGenerativeAIException(message: String, cause: Throwable? = nu RequestTimeoutException(cause.message ?: "", cause.cause) is com.google.ai.client.generativeai.common.UnknownException -> UnknownException(cause.message ?: "", cause.cause) + is com.google.ai.client.generativeai.common.QuotaExceededException -> + QuotaExceededException(cause.message ?: "", cause.cause) else -> UnknownException(cause.message ?: "", cause) } is TimeoutCancellationException -> @@ -89,7 +89,7 @@ class InvalidAPIKeyException(message: String, cause: Throwable? = null) : class PromptBlockedException(val response: GenerateContentResponse, cause: Throwable? = null) : GoogleGenerativeAIException( "Prompt was blocked: ${response.promptFeedback?.blockReason?.name}", - cause + cause, ) /** @@ -119,7 +119,7 @@ class InvalidStateException(message: String, cause: Throwable? = null) : class ResponseStoppedException(val response: GenerateContentResponse, cause: Throwable? = null) : GoogleGenerativeAIException( "Content generation stopped. Reason: ${response.candidates.first().finishReason?.name}", - cause + cause, ) /** @@ -130,6 +130,10 @@ class ResponseStoppedException(val response: GenerateContentResponse, cause: Thr class RequestTimeoutException(message: String, cause: Throwable? = null) : GoogleGenerativeAIException(message, cause) +/** The quota for this API key is depleted, retry this request at a later time. */ +class QuotaExceededException(message: String, cause: Throwable? = null) : + GoogleGenerativeAIException(message, cause) + /** Catch all case for exceptions not explicitly expected. */ class UnknownException(message: String, cause: Throwable? = null) : GoogleGenerativeAIException(message, cause) From 849f432290369ed64f53d4e005aa660b846581d5 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Mon, 25 Mar 2024 19:02:24 -0400 Subject: [PATCH 07/41] Depend on right mockk version (#94) Mockk 1.13.* depends on kotlin 1.9 --- generativeai/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generativeai/build.gradle.kts b/generativeai/build.gradle.kts index bac2aefa..89c99971 100644 --- a/generativeai/build.gradle.kts +++ b/generativeai/build.gradle.kts @@ -87,7 +87,7 @@ dependencies { testImplementation("junit:junit:4.13.2") testImplementation("io.kotest:kotest-assertions-core:5.5.5") testImplementation("io.kotest:kotest-assertions-core-jvm:5.5.5") - testImplementation("io.mockk:mockk:1.13.10") + testImplementation("io.mockk:mockk:1.12.8") androidTestImplementation("androidx.test.ext:junit:1.1.5") androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") From a2b71dfbc3c05dbbd80cf9148c1cf0a46a40f911 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Tue, 26 Mar 2024 15:42:04 -0400 Subject: [PATCH 08/41] Function calling (common only) (#97) Based on work from https://github.com/google/generative-ai-android/tree/davidmotson.auto_function_split --------- Co-authored-by: David Motsonashvili Co-authored-by: David Motsonashvili --- .../ai/client/generativeai/common/Request.kt | 2 ++ .../generativeai/common/RequestOptions.kt | 6 ++--- .../generativeai/common/client/Types.kt | 22 ++++++++++++++++++- .../generativeai/common/shared/Types.kt | 11 ++++++++++ 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt index 89afce30..4e484266 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt @@ -17,6 +17,7 @@ package com.google.ai.client.generativeai.common import com.google.ai.client.generativeai.common.client.GenerationConfig +import com.google.ai.client.generativeai.common.client.Tool import com.google.ai.client.generativeai.common.shared.Content import com.google.ai.client.generativeai.common.shared.SafetySetting import kotlinx.serialization.SerialName @@ -30,6 +31,7 @@ data class GenerateContentRequest( val contents: List, @SerialName("safety_settings") val safetySettings: List? = null, @SerialName("generation_config") val generationConfig: GenerationConfig? = null, + val tools: List? = null, ) : Request @Serializable diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt index 4decb5c1..e9ab3a9f 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt @@ -31,16 +31,16 @@ import kotlin.time.toDuration class RequestOptions( val timeout: Duration, val apiVersion: String = "v1", - val endpoint: String = "https://generativelanguage.googleapis.com" + val endpoint: String = "https://generativelanguage.googleapis.com", ) { @JvmOverloads constructor( timeout: Long? = HttpTimeout.INFINITE_TIMEOUT_MS, apiVersion: String = "v1", - endpoint: String = "https://generativelanguage.googleapis.com" + endpoint: String = "https://generativelanguage.googleapis.com", ) : this( (timeout ?: HttpTimeout.INFINITE_TIMEOUT_MS).toDuration(DurationUnit.MILLISECONDS), apiVersion, - endpoint + endpoint, ) } diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt index bacbb1f1..00d44cc9 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt @@ -26,5 +26,25 @@ data class GenerationConfig( @SerialName("top_k") val topK: Int?, @SerialName("candidate_count") val candidateCount: Int?, @SerialName("max_output_tokens") val maxOutputTokens: Int?, - @SerialName("stop_sequences") val stopSequences: List? + @SerialName("stop_sequences") val stopSequences: List?, +) + +@Serializable data class Tool(val functionDeclarations: List) + +@Serializable +data class FunctionDeclaration( + val name: String, + val description: String, + val parameters: Schema, +) + +@Serializable +data class Schema( + val type: String, + val description: String? = null, + val format: String? = null, + val enum: List? = null, + val properties: Map? = null, + val required: List? = null, + val items: Schema? = null, ) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt index b14b8985..d10bdf36 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt @@ -26,6 +26,7 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.SerializationException import kotlinx.serialization.json.JsonContentPolymorphicSerializer import kotlinx.serialization.json.JsonElement +import kotlinx.serialization.json.JsonObject import kotlinx.serialization.json.jsonObject object HarmCategorySerializer : @@ -52,6 +53,14 @@ data class Content(@EncodeDefault val role: String? = "user", val parts: List) + @Serializable data class FileDataPart(@SerialName("file_data") val fileData: FileData) : Part @Serializable @@ -83,6 +92,8 @@ object PartSerializer : JsonContentPolymorphicSerializer(Part::class) { val jsonObject = element.jsonObject return when { "text" in jsonObject -> TextPart.serializer() + "functionCall" in jsonObject -> FunctionCallPart.serializer() + "functionResponse" in jsonObject -> FunctionResponsePart.serializer() "inline_data" in jsonObject -> BlobPart.serializer() "file_data" in jsonObject -> FileDataPart.serializer() else -> throw SerializationException("Unknown Part type") From ab722b654709b07b9b4da09b0b3855016e7c9009 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 27 Mar 2024 15:18:57 -0400 Subject: [PATCH 09/41] Bump futures dependency (#98) Should address issue #69 --- generativeai/build.gradle.kts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generativeai/build.gradle.kts b/generativeai/build.gradle.kts index 89c99971..fbe489ea 100644 --- a/generativeai/build.gradle.kts +++ b/generativeai/build.gradle.kts @@ -82,8 +82,8 @@ dependencies { implementation("org.reactivestreams:reactive-streams:1.0.3") implementation("com.google.guava:listenablefuture:1.0") - implementation("androidx.concurrent:concurrent-futures:1.2.0-alpha02") - implementation("androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha02") + implementation("androidx.concurrent:concurrent-futures:1.2.0-alpha03") + implementation("androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha03") testImplementation("junit:junit:4.13.2") testImplementation("io.kotest:kotest-assertions-core:5.5.5") testImplementation("io.kotest:kotest-assertions-core-jvm:5.5.5") From 40f496e47d96e85474e58b210690ffb61c907116 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Thu, 28 Mar 2024 15:11:02 -0400 Subject: [PATCH 10/41] Don't encode the model name in the outgoing request (#101) The field can be ignored in the request. b/331762991 --- .../ai/client/generativeai/common/Request.kt | 6 ++- .../generativeai/common/APIControllerTests.kt | 48 ++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt index 4e484266..cb6deff5 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt @@ -22,12 +22,13 @@ import com.google.ai.client.generativeai.common.shared.Content import com.google.ai.client.generativeai.common.shared.SafetySetting import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlinx.serialization.Transient sealed interface Request @Serializable data class GenerateContentRequest( - val model: String, + @Transient val model: String? = null, val contents: List, @SerialName("safety_settings") val safetySettings: List? = null, @SerialName("generation_config") val generationConfig: GenerationConfig? = null, @@ -35,4 +36,5 @@ data class GenerateContentRequest( ) : Request @Serializable -data class CountTokensRequest(val model: String, val contents: List) : Request +data class CountTokensRequest(@Transient val model: String? = null, val contents: List) : + Request diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt index a05d6d67..7674a553 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt @@ -22,11 +22,14 @@ import com.google.ai.client.generativeai.common.util.commonTest import com.google.ai.client.generativeai.common.util.createResponses import com.google.ai.client.generativeai.common.util.doBlocking import com.google.ai.client.generativeai.common.util.prepareStreamingResponse +import io.kotest.assertions.json.shouldContainJsonKey +import io.kotest.assertions.json.shouldNotContainJsonKey import io.kotest.assertions.throwables.shouldThrow import io.kotest.matchers.shouldBe import io.kotest.matchers.string.shouldContain import io.ktor.client.engine.mock.MockEngine import io.ktor.client.engine.mock.respond +import io.ktor.content.TextContent import io.ktor.http.HttpHeaders import io.ktor.http.HttpStatusCode import io.ktor.http.headersOf @@ -35,6 +38,7 @@ import io.ktor.utils.io.close import io.ktor.utils.io.writeFully import kotlin.time.Duration.Companion.seconds import kotlinx.coroutines.withTimeout +import kotlinx.serialization.encodeToString import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized @@ -69,7 +73,7 @@ internal class APIControllerTests { } } -internal class EndpointTests { +internal class RequestFormatTests { @Test fun `using default endpoint`() = doBlocking { val channel = ByteChannel(autoFlush = true) @@ -114,6 +118,45 @@ internal class EndpointTests { mockEngine.requestHistory.first().url.host shouldBe "my.custom.endpoint" } + + @Test + fun `generateContentRequest doesn't include the model name`() = doBlocking { + val channel = ByteChannel(autoFlush = true) + val mockEngine = MockEngine { + respond(channel, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } + val controller = + APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + + withTimeout(5.seconds) { + controller.generateContentStream(textGenerateContentRequest("cats")).collect { + it.candidates?.isEmpty() shouldBe false + channel.close() + } + } + + val requestBodyAsText = (mockEngine.requestHistory.first().body as TextContent).text + requestBodyAsText shouldContainJsonKey "contents" + requestBodyAsText shouldNotContainJsonKey "model" + } + + @Test + fun `countTokenRequest doesn't include the model name`() = doBlocking { + val response = JSON.encodeToString(CountTokensResponse(totalTokens = 10)) + val mockEngine = MockEngine { + respond(response, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + + val controller = + APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + + withTimeout(5.seconds) { controller.countTokens(textCountTokenRequest("cats")) } + + val requestBodyAsText = (mockEngine.requestHistory.first().body as TextContent).text + requestBodyAsText shouldContainJsonKey "contents" + requestBodyAsText shouldNotContainJsonKey "model" + } } @RunWith(Parameterized::class) @@ -157,3 +200,6 @@ fun textGenerateContentRequest(prompt: String) = model = "unused", contents = listOf(Content(parts = listOf(TextPart(prompt)))) ) + +fun textCountTokenRequest(prompt: String) = + CountTokensRequest(model = "unused", contents = listOf(Content(parts = listOf(TextPart(prompt))))) From f22a52f5fd4d99dc48d196bc4e7b4332e3ae76a1 Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Tue, 2 Apr 2024 15:27:04 +0000 Subject: [PATCH 11/41] split the auto function calling changes between common and generativeai (#90) Co-authored-by: David Motsonashvili --- .changes/cloud-camp-bait-calculator.json | 1 + generativeai/build.gradle.kts | 1 + .../com/google/ai/client/generativeai/Chat.kt | 4 +- .../ai/client/generativeai/GenerativeModel.kt | 54 +++- .../generativeai/internal/util/conversions.kt | 62 +++- .../generativeai/type/FunctionDeclarations.kt | 276 ++++++++++++++++++ .../generativeai/type/FunctionParameter.kt | 19 ++ .../type/GenerateContentResponse.kt | 6 + .../generativeai/type/GenerativeBeta.kt | 22 ++ .../ai/client/generativeai/type/Part.kt | 7 + .../generativeai/type/RequestOptions.kt | 12 +- .../ai/client/generativeai/type/Tool.kt | 28 ++ .../ai/client/generativeai/type/Type.kt | 42 +++ 13 files changed, 523 insertions(+), 11 deletions(-) create mode 100644 .changes/cloud-camp-bait-calculator.json create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionParameter.kt create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerativeBeta.kt create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/Type.kt diff --git a/.changes/cloud-camp-bait-calculator.json b/.changes/cloud-camp-bait-calculator.json new file mode 100644 index 00000000..ddb946a0 --- /dev/null +++ b/.changes/cloud-camp-bait-calculator.json @@ -0,0 +1 @@ +{"type":"MAJOR","changes":["Add function calling"]} diff --git a/generativeai/build.gradle.kts b/generativeai/build.gradle.kts index fbe489ea..ba88cefb 100644 --- a/generativeai/build.gradle.kts +++ b/generativeai/build.gradle.kts @@ -79,6 +79,7 @@ dependencies { implementation("org.slf4j:slf4j-nop:2.0.9") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive:1.7.3") + implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1") implementation("org.reactivestreams:reactive-streams:1.0.3") implementation("com.google.guava:listenablefuture:1.0") diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/Chat.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/Chat.kt index b536c244..fbe8f346 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/Chat.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/Chat.kt @@ -167,8 +167,8 @@ class Chat(private val model: GenerativeModel, val history: MutableList } private fun Content.assertComesFromUser() { - if (role != "user") { - throw InvalidStateException("Chat prompts should come from the 'user' role.") + if (role !in listOf("user", "function")) { + throw InvalidStateException("Chat prompts should come from the 'user' or 'function' role.") } } diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt index 690f5be4..90dc8daa 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt @@ -25,18 +25,29 @@ import com.google.ai.client.generativeai.internal.util.toPublic import com.google.ai.client.generativeai.type.Content import com.google.ai.client.generativeai.type.CountTokensResponse import com.google.ai.client.generativeai.type.FinishReason +import com.google.ai.client.generativeai.type.FourParameterFunction +import com.google.ai.client.generativeai.type.FunctionCallPart import com.google.ai.client.generativeai.type.GenerateContentResponse import com.google.ai.client.generativeai.type.GenerationConfig +import com.google.ai.client.generativeai.type.GenerativeBeta import com.google.ai.client.generativeai.type.GoogleGenerativeAIException +import com.google.ai.client.generativeai.type.InvalidStateException +import com.google.ai.client.generativeai.type.NoParameterFunction +import com.google.ai.client.generativeai.type.OneParameterFunction import com.google.ai.client.generativeai.type.PromptBlockedException import com.google.ai.client.generativeai.type.RequestOptions import com.google.ai.client.generativeai.type.ResponseStoppedException import com.google.ai.client.generativeai.type.SafetySetting import com.google.ai.client.generativeai.type.SerializationException +import com.google.ai.client.generativeai.type.ThreeParameterFunction +import com.google.ai.client.generativeai.type.Tool +import com.google.ai.client.generativeai.type.TwoParameterFunction import com.google.ai.client.generativeai.type.content import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.map +import kotlinx.serialization.ExperimentalSerializationApi +import org.json.JSONObject /** * A facilitator for a given multimodal model (eg; Gemini). @@ -48,14 +59,16 @@ import kotlinx.coroutines.flow.map * generation * @property requestOptions configuration options to utilize during backend communication */ +@OptIn(ExperimentalSerializationApi::class) class GenerativeModel internal constructor( val modelName: String, val apiKey: String, val generationConfig: GenerationConfig? = null, val safetySettings: List? = null, + val tools: List? = null, val requestOptions: RequestOptions = RequestOptions(), - private val controller: APIController + private val controller: APIController, ) { @JvmOverloads @@ -64,14 +77,16 @@ internal constructor( apiKey: String, generationConfig: GenerationConfig? = null, safetySettings: List? = null, + tools: List? = null, requestOptions: RequestOptions = RequestOptions(), ) : this( modelName, apiKey, generationConfig, safetySettings, + tools, requestOptions, - APIController(apiKey, modelName, requestOptions.toInternal()) + APIController(apiKey, modelName, requestOptions.toInternal()), ) /** @@ -171,12 +186,45 @@ internal constructor( return countTokens(content { image(prompt) }) } + /** + * Executes a function requested by the model. + * + * @param functionCallPart A [FunctionCallPart] from the model, containing a function call and + * parameters + * @return The output of the requested function call + */ + @OptIn(GenerativeBeta::class) + suspend fun executeFunction(functionCallPart: FunctionCallPart): JSONObject { + if (tools == null) { + throw InvalidStateException("No registered tools") + } + val callable = + tools.flatMap { it.functionDeclarations }.firstOrNull { it.name == functionCallPart.name } + ?: throw InvalidStateException("No registered function named ${functionCallPart.name}") + return when (callable) { + is NoParameterFunction -> callable.execute() + is OneParameterFunction<*> -> + (callable as OneParameterFunction).execute(functionCallPart) + is TwoParameterFunction<*, *> -> + (callable as TwoParameterFunction).execute(functionCallPart) + is ThreeParameterFunction<*, *, *> -> + (callable as ThreeParameterFunction).execute(functionCallPart) + is FourParameterFunction<*, *, *, *> -> + (callable as FourParameterFunction).execute(functionCallPart) + else -> { + throw RuntimeException("UNREACHABLE") + } + } + } + + @OptIn(GenerativeBeta::class) private fun constructRequest(vararg prompt: Content) = GenerateContentRequest( modelName, prompt.map { it.toInternal() }, safetySettings?.map { it.toInternal() }, - generationConfig?.toInternal() + generationConfig?.toInternal(), + tools?.map { it.toInternal() }, ) private fun constructCountTokensRequest(vararg prompt: Content) = diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt index 5abf8509..c1b813e5 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt @@ -23,6 +23,7 @@ import com.google.ai.client.generativeai.common.CountTokensResponse import com.google.ai.client.generativeai.common.GenerateContentResponse import com.google.ai.client.generativeai.common.RequestOptions import com.google.ai.client.generativeai.common.client.GenerationConfig +import com.google.ai.client.generativeai.common.client.Schema import com.google.ai.client.generativeai.common.server.BlockReason import com.google.ai.client.generativeai.common.server.Candidate import com.google.ai.client.generativeai.common.server.CitationSources @@ -33,6 +34,10 @@ import com.google.ai.client.generativeai.common.server.SafetyRating import com.google.ai.client.generativeai.common.shared.Blob import com.google.ai.client.generativeai.common.shared.BlobPart import com.google.ai.client.generativeai.common.shared.Content +import com.google.ai.client.generativeai.common.shared.FunctionCall +import com.google.ai.client.generativeai.common.shared.FunctionCallPart +import com.google.ai.client.generativeai.common.shared.FunctionResponse +import com.google.ai.client.generativeai.common.shared.FunctionResponsePart import com.google.ai.client.generativeai.common.shared.HarmBlockThreshold import com.google.ai.client.generativeai.common.shared.HarmCategory import com.google.ai.client.generativeai.common.shared.Part @@ -40,10 +45,16 @@ import com.google.ai.client.generativeai.common.shared.SafetySetting import com.google.ai.client.generativeai.common.shared.TextPart import com.google.ai.client.generativeai.type.BlockThreshold import com.google.ai.client.generativeai.type.CitationMetadata +import com.google.ai.client.generativeai.type.FunctionDeclaration +import com.google.ai.client.generativeai.type.GenerativeBeta import com.google.ai.client.generativeai.type.ImagePart import com.google.ai.client.generativeai.type.SerializationException +import com.google.ai.client.generativeai.type.Tool import com.google.ai.client.generativeai.type.content import java.io.ByteArrayOutputStream +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonObject +import org.json.JSONObject private const val BASE_64_FLAGS = Base64.NO_WRAP @@ -59,6 +70,10 @@ internal fun com.google.ai.client.generativeai.type.Part.toInternal(): Part { is ImagePart -> BlobPart(Blob("image/jpeg", encodeBitmapToBase64Png(image))) is com.google.ai.client.generativeai.type.BlobPart -> BlobPart(Blob(mimeType, Base64.encodeToString(blob, BASE_64_FLAGS))) + is com.google.ai.client.generativeai.type.FunctionCallPart -> + FunctionCallPart(FunctionCall(name, args.orEmpty())) + is com.google.ai.client.generativeai.type.FunctionResponsePart -> + FunctionResponsePart(FunctionResponse(name, response.toInternal())) else -> throw SerializationException( "The given subclass of Part (${javaClass.simpleName}) is not supported in the serialization yet." @@ -76,7 +91,7 @@ internal fun com.google.ai.client.generativeai.type.GenerationConfig.toInternal( topK = topK, candidateCount = candidateCount, maxOutputTokens = maxOutputTokens, - stopSequences = stopSequences + stopSequences = stopSequences, ) internal fun com.google.ai.client.generativeai.type.HarmCategory.toInternal() = @@ -99,6 +114,35 @@ internal fun BlockThreshold.toInternal() = BlockThreshold.UNSPECIFIED -> HarmBlockThreshold.UNSPECIFIED } +@GenerativeBeta +internal fun Tool.toInternal() = + com.google.ai.client.generativeai.common.client.Tool(functionDeclarations.map { it.toInternal() }) + +@GenerativeBeta +internal fun FunctionDeclaration.toInternal() = + com.google.ai.client.generativeai.common.client.FunctionDeclaration( + name, + description, + Schema( + properties = getParameters().associate { it.name to it.toInternal() }, + required = getParameters().map { it.name }, + type = "OBJECT", + ), + ) + +internal fun com.google.ai.client.generativeai.type.Schema.toInternal(): Schema = + Schema( + type.name, + description, + format, + enum, + properties?.mapValues { it.value.toInternal() }, + required, + items?.toInternal(), + ) + +internal fun JSONObject.toInternal() = Json.decodeFromString(toString()) + internal fun Candidate.toPublic(): com.google.ai.client.generativeai.type.Candidate { val safetyRatings = safetyRatings?.map { it.toPublic() }.orEmpty() val citations = citationMetadata?.citationSources?.map { it.toPublic() }.orEmpty() @@ -108,7 +152,7 @@ internal fun Candidate.toPublic(): com.google.ai.client.generativeai.type.Candid this.content?.toPublic() ?: content("model") {}, safetyRatings, citations, - finishReason + finishReason, ) } @@ -126,6 +170,16 @@ internal fun Part.toPublic(): com.google.ai.client.generativeai.type.Part { com.google.ai.client.generativeai.type.BlobPart(inlineData.mimeType, data) } } + is FunctionCallPart -> + com.google.ai.client.generativeai.type.FunctionCallPart( + functionCall.name, + functionCall.args.orEmpty(), + ) + is FunctionResponsePart -> + com.google.ai.client.generativeai.type.FunctionResponsePart( + functionResponse.name, + functionResponse.response.toPublic(), + ) else -> throw SerializationException( "Unsupported part type \"${javaClass.simpleName}\" provided. This model may not be supported by this SDK." @@ -192,12 +246,14 @@ internal fun BlockReason.toPublic() = internal fun GenerateContentResponse.toPublic() = com.google.ai.client.generativeai.type.GenerateContentResponse( candidates?.map { it.toPublic() }.orEmpty(), - promptFeedback?.toPublic() + promptFeedback?.toPublic(), ) internal fun CountTokensResponse.toPublic() = com.google.ai.client.generativeai.type.CountTokensResponse(totalTokens) +internal fun JsonObject.toPublic() = JSONObject(toString()) + private fun encodeBitmapToBase64Png(input: Bitmap): String { ByteArrayOutputStream().let { input.compress(Bitmap.CompressFormat.JPEG, 80, it) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt new file mode 100644 index 00000000..0382a411 --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt @@ -0,0 +1,276 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +import org.json.JSONObject + +/** + * A declared function, including implementation, that a model can be given access to in order to + * gain info or complete tasks. + * + * @property name The name of the function call, this should be clear and descriptive for the model + * @property description A description of what the function does and its output. + * @property function the function implementation + */ +@GenerativeBeta +class NoParameterFunction( + name: String, + description: String, + val function: suspend () -> JSONObject, +) : FunctionDeclaration(name, description) { + override fun getParameters() = listOf>() + + suspend fun execute() = function() + + override suspend fun execute(part: FunctionCallPart) = function() +} + +/** + * A declared function, including implementation, that a model can be given access to in order to + * gain info or complete tasks. + * + * @property name The name of the function call, this should be clear and descriptive for the model + * @property description A description of what the function does and its output. + * @property param A description of the first function parameter + * @property function the function implementation + */ +@GenerativeBeta +class OneParameterFunction( + name: String, + description: String, + val param: Schema, + val function: suspend (T) -> JSONObject, +) : FunctionDeclaration(name, description) { + override fun getParameters() = listOf(param) + + override suspend fun execute(part: FunctionCallPart): JSONObject { + val arg1 = part.getArgOrThrow(param) + return function(arg1) + } +} + +/** + * A declared function, including implementation, that a model can be given access to in order to + * gain info or complete tasks. + * + * @property name The name of the function call, this should be clear and descriptive for the model + * @property description A description of what the function does and its output. + * @property param1 A description of the first function parameter + * @property param2 A description of the second function parameter + * @property function the function implementation + */ +@GenerativeBeta +class TwoParameterFunction( + name: String, + description: String, + val param1: Schema, + val param2: Schema, + val function: suspend (T, U) -> JSONObject, +) : FunctionDeclaration(name, description) { + override fun getParameters() = listOf(param1, param2) + + override suspend fun execute(part: FunctionCallPart): JSONObject { + val arg1 = part.getArgOrThrow(param1) + val arg2 = part.getArgOrThrow(param2) + return function(arg1, arg2) + } +} + +/** + * A declared function, including implementation, that a model can be given access to in order to + * gain info or complete tasks. + * + * @property name The name of the function call, this should be clear and descriptive for the model + * @property description A description of what the function does and its output. + * @property param1 A description of the first function parameter + * @property param2 A description of the second function parameter + * @property param3 A description of the third function parameter + * @property function the function implementation + */ +@GenerativeBeta +class ThreeParameterFunction( + name: String, + description: String, + val param1: Schema, + val param2: Schema, + val param3: Schema, + val function: suspend (T, U, V) -> JSONObject, +) : FunctionDeclaration(name, description) { + override fun getParameters() = listOf(param1, param2, param3) + + override suspend fun execute(part: FunctionCallPart): JSONObject { + val arg1 = part.getArgOrThrow(param1) + val arg2 = part.getArgOrThrow(param2) + val arg3 = part.getArgOrThrow(param3) + return function(arg1, arg2, arg3) + } +} + +/** + * A declared function, including implementation, that a model can be given access to in order to + * gain info or complete tasks. + * + * @property name The name of the function call, this should be clear and descriptive for the model + * @property description A description of what the function does and its output. + * @property param1 A description of the first function parameter + * @property param2 A description of the second function parameter + * @property param3 A description of the third function parameter + * @property param4 A description of the fourth function parameter + * @property function the function implementation + */ +@GenerativeBeta +class FourParameterFunction( + name: String, + description: String, + val param1: Schema, + val param2: Schema, + val param3: Schema, + val param4: Schema, + val function: suspend (T, U, V, W) -> JSONObject, +) : FunctionDeclaration(name, description) { + override fun getParameters() = listOf(param1, param2, param3, param4) + + override suspend fun execute(part: FunctionCallPart): JSONObject { + val arg1 = part.getArgOrThrow(param1) + val arg2 = part.getArgOrThrow(param2) + val arg3 = part.getArgOrThrow(param3) + val arg4 = part.getArgOrThrow(param4) + return function(arg1, arg2, arg3, arg4) + } +} + +@GenerativeBeta +abstract class FunctionDeclaration(val name: String, val description: String) { + abstract fun getParameters(): List> + + abstract suspend fun execute(part: FunctionCallPart): JSONObject +} + +/** + * Represents a parameter for a declared function + * + * @property name: The name of the parameter + * @property description: The description of what the parameter should contain or represent + * @property format: format information for the parameter, this can include bitlength in the case of + * int/float or keywords like "enum" for the string type + * @property enum: contains the enum values for a string enum + * @property type: contains the type info and parser + * @property properties: if type is OBJECT, then this contains the description of the fields of the + * object by name + * @property required: if type is OBJECT, then this contains the list of required keys + * @property items: if the type is ARRAY, then this contains a description of the objects in the + * array + */ +class Schema( + val name: String, + val description: String, + val format: String? = null, + val enum: List? = null, + val properties: Map>? = null, + val required: List? = null, + val items: Schema? = null, + val type: FunctionType, +) { + fun fromString(value: String?) = type.parse(value) + + companion object { + /** Registers a schema for an integer number */ + fun int(name: String, description: String) = + Schema(name = name, description = description, type = FunctionType.INTEGER) + + /** Registers a schema for a string */ + fun str(name: String, description: String) = + Schema(name = name, description = description, type = FunctionType.STRING) + + /** Registers a schema for a boolean */ + fun bool(name: String, description: String) = + Schema(name = name, description = description, type = FunctionType.BOOLEAN) + + /** Registers a schema for a floating point number */ + fun num(name: String, description: String) = + Schema(name = name, description = description, type = FunctionType.NUMBER) + + /** + * Registers a schema for a complex object. In a function it will be returned as a [JSONObject] + */ + fun obj(name: String, description: String) = + Schema(name = name, description = description, type = FunctionType.OBJECT) + + /** Registers a schema for an array */ + fun arr(name: String, description: String) = + Schema>(name = name, description = description, type = FunctionType.ARRAY) + + /** Registers a schema for an enum */ + fun enum(name: String, description: String, values: List) = + Schema( + name = name, + description = description, + format = "enum", + enum = values, + type = FunctionType.STRING, + ) + } +} + +@GenerativeBeta +fun defineFunction(name: String, description: String, function: suspend () -> JSONObject) = + NoParameterFunction(name, description, function) + +@GenerativeBeta +fun defineFunction( + name: String, + description: String, + arg1: Schema, + function: suspend (T) -> JSONObject, +) = OneParameterFunction(name, description, arg1, function) + +@GenerativeBeta +fun defineFunction( + name: String, + description: String, + arg1: Schema, + arg2: Schema, + function: suspend (T, U) -> JSONObject, +) = TwoParameterFunction(name, description, arg1, arg2, function) + +@GenerativeBeta +fun defineFunction( + name: String, + description: String, + arg1: Schema, + arg2: Schema, + arg3: Schema, + function: suspend (T, U, W) -> JSONObject, +) = ThreeParameterFunction(name, description, arg1, arg2, arg3, function) + +@GenerativeBeta +fun defineFunction( + name: String, + description: String, + arg1: Schema, + arg2: Schema, + arg3: Schema, + arg4: Schema, + function: suspend (T, U, W, Z) -> JSONObject, +) = FourParameterFunction(name, description, arg1, arg2, arg3, arg4, function) + +private fun FunctionCallPart.getArgOrThrow(param: Schema): T { + return param.fromString(args[param.name]) + ?: throw RuntimeException( + "Missing argument for parameter \"${param.name}\" for function \"$name\"" + ) +} diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionParameter.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionParameter.kt new file mode 100644 index 00000000..cb9ccbe1 --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionParameter.kt @@ -0,0 +1,19 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +class FunctionParameter(val name: String, val description: String, val type: FunctionType) {} diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt index 9e33ce16..9fe30329 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt @@ -32,6 +32,12 @@ class GenerateContentResponse( /** Convenience field representing the first text part in the response, if it exists. */ val text: String? by lazy { firstPartAs()?.text } + /** Convenience field representing the first text part in the response, if it exists. */ + val functionCall: FunctionCallPart? by lazy { firstPartAs() } + + /** Convenience field representing the first text part in the response, if it exists. */ + val functionResponse: FunctionResponsePart? by lazy { firstPartAs() } + private inline fun firstPartAs(): T? { if (candidates.isEmpty()) { warn("No candidates were found, but was asked to get a candidate.") diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerativeBeta.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerativeBeta.kt new file mode 100644 index 00000000..509f62e3 --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerativeBeta.kt @@ -0,0 +1,22 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +@RequiresOptIn(message = "This API is only available on the v1beta version") +@Retention(AnnotationRetention.BINARY) +@Target(AnnotationTarget.CLASS, AnnotationTarget.FUNCTION) +annotation class GenerativeBeta diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt index 4c54cc43..83f22953 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt @@ -17,6 +17,7 @@ package com.google.ai.client.generativeai.type import android.graphics.Bitmap +import org.json.JSONObject /** * Interface representing data sent to and received from requests. @@ -40,6 +41,12 @@ class ImagePart(val image: Bitmap) : Part /** Represents binary data with an associated MIME type sent to and received from requests. */ class BlobPart(val mimeType: String, val blob: ByteArray) : Part +/** Represents function call name and params received from requests. */ +class FunctionCallPart(val name: String, val args: Map) : Part + +/** Represents function call output to be returned to the model when it requests a function call */ +class FunctionResponsePart(val name: String, val response: JSONObject) : Part + /** @return The part as a [String] if it represents text, and null otherwise */ fun Part.asTextOrNull(): String? = (this as? TextPart)?.text diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt index e25561fb..a2470ef2 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt @@ -27,10 +27,16 @@ import kotlin.time.toDuration * first response. * @property apiVersion the api endpoint to call. */ -class RequestOptions(val timeout: Duration, val apiVersion: String = "v1") { +class RequestOptions( + val timeout: Duration, + val apiVersion: String = "v1", +) { @JvmOverloads constructor( timeout: Long? = Long.MAX_VALUE, - apiVersion: String = "v1" - ) : this((timeout ?: Long.MAX_VALUE).toDuration(DurationUnit.MILLISECONDS), apiVersion) + apiVersion: String = "v1", + ) : this( + (timeout ?: Long.MAX_VALUE).toDuration(DurationUnit.MILLISECONDS), + apiVersion, + ) } diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt new file mode 100644 index 00000000..67467710 --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt @@ -0,0 +1,28 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +/** + * Contains a set of function declarations that the model has access to. These can be used to gather + * information, or complete tasks + * + * @param functionDeclarations The set of functions that this tool allows the model access to + */ +@OptIn(GenerativeBeta::class) +class Tool( + val functionDeclarations: List, +) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Type.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Type.kt new file mode 100644 index 00000000..c220031d --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Type.kt @@ -0,0 +1,42 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +import kotlinx.serialization.json.Json +import kotlinx.serialization.json.jsonArray +import org.json.JSONObject + +/** + * Represents and passes the type information for an automated function call. + * + * @property name: the enum name of the type + * @property parse: the deserialization function + * @property T: the type of the object that this maps to in code. + */ +class FunctionType(val name: String, val parse: (String?) -> T?) { + companion object { + val STRING = FunctionType("STRING") { it } + val INTEGER = FunctionType("INTEGER") { it?.toLongOrNull() } + val NUMBER = FunctionType("NUMBER") { it?.toDoubleOrNull() } + val BOOLEAN = FunctionType("BOOLEAN") { it?.toBoolean() } + val ARRAY = + FunctionType>("ARRAY") { it -> + it?.let { Json.parseToJsonElement(it).jsonArray.map { element -> element.toString() } } + } + val OBJECT = FunctionType("OBJECT") { it?.let { JSONObject(it) } } + } +} From f14808f7303b56d531f72696b0bbaa63aed268b6 Mon Sep 17 00:00:00 2001 From: emilypgoogle <110422458+emilypgoogle@users.noreply.github.com> Date: Wed, 3 Apr 2024 10:23:58 -0500 Subject: [PATCH 12/41] Add constrained decoding support (#103) --- .../ai/client/generativeai/common/Request.kt | 2 + .../generativeai/common/client/Types.kt | 16 +++++++ .../generativeai/common/APIControllerTests.kt | 34 +++++++++++++++ .../ai/client/generativeai/GenerativeModel.kt | 5 +++ .../generativeai/internal/util/conversions.kt | 17 ++++++++ .../type/FunctionCallingConfig.kt | 43 +++++++++++++++++++ .../ai/client/generativeai/type/ToolConfig.kt | 34 +++++++++++++++ 7 files changed, 151 insertions(+) create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt index cb6deff5..18b7dded 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt @@ -18,6 +18,7 @@ package com.google.ai.client.generativeai.common import com.google.ai.client.generativeai.common.client.GenerationConfig import com.google.ai.client.generativeai.common.client.Tool +import com.google.ai.client.generativeai.common.client.ToolConfig import com.google.ai.client.generativeai.common.shared.Content import com.google.ai.client.generativeai.common.shared.SafetySetting import kotlinx.serialization.SerialName @@ -33,6 +34,7 @@ data class GenerateContentRequest( @SerialName("safety_settings") val safetySettings: List? = null, @SerialName("generation_config") val generationConfig: GenerationConfig? = null, val tools: List? = null, + @SerialName("tool_config") var toolConfig: ToolConfig? = null, ) : Request @Serializable diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt index 00d44cc9..c3bff52b 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt @@ -31,6 +31,22 @@ data class GenerationConfig( @Serializable data class Tool(val functionDeclarations: List) +@Serializable +data class ToolConfig( + @SerialName("function_calling_config") val functionCallingConfig: FunctionCallingConfig +) + +@Serializable +data class FunctionCallingConfig(val mode: Mode) { + @Serializable + enum class Mode { + @SerialName("MODE_UNSPECIFIED") UNSPECIFIED, + AUTO, + ANY, + NONE + } +} + @Serializable data class FunctionDeclaration( val name: String, diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt index 7674a553..6318b50c 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt @@ -16,6 +16,8 @@ package com.google.ai.client.generativeai.common +import com.google.ai.client.generativeai.common.client.FunctionCallingConfig +import com.google.ai.client.generativeai.common.client.ToolConfig import com.google.ai.client.generativeai.common.shared.Content import com.google.ai.client.generativeai.common.shared.TextPart import com.google.ai.client.generativeai.common.util.commonTest @@ -157,6 +159,38 @@ internal class RequestFormatTests { requestBodyAsText shouldContainJsonKey "contents" requestBodyAsText shouldNotContainJsonKey "model" } + + @Test + fun `ToolConfig serialization contains correct keys`() = doBlocking { + val channel = ByteChannel(autoFlush = true) + val mockEngine = MockEngine { + respond(channel, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } + + val controller = + APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + + withTimeout(5.seconds) { + controller + .generateContentStream( + GenerateContentRequest( + model = "unused", + contents = listOf(Content(parts = listOf(TextPart("Arbitrary")))), + toolConfig = + ToolConfig( + functionCallingConfig = + FunctionCallingConfig(mode = FunctionCallingConfig.Mode.AUTO) + ) + ) + ) + .collect { channel.close() } + } + + val requestBodyAsText = (mockEngine.requestHistory.first().body as TextContent).text + + requestBodyAsText shouldContainJsonKey "tool_config.function_calling_config.mode" + } } @RunWith(Parameterized::class) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt index 90dc8daa..a2f285f1 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt @@ -41,6 +41,7 @@ import com.google.ai.client.generativeai.type.SafetySetting import com.google.ai.client.generativeai.type.SerializationException import com.google.ai.client.generativeai.type.ThreeParameterFunction import com.google.ai.client.generativeai.type.Tool +import com.google.ai.client.generativeai.type.ToolConfig import com.google.ai.client.generativeai.type.TwoParameterFunction import com.google.ai.client.generativeai.type.content import kotlinx.coroutines.flow.Flow @@ -67,6 +68,7 @@ internal constructor( val generationConfig: GenerationConfig? = null, val safetySettings: List? = null, val tools: List? = null, + val toolConfig: ToolConfig? = null, val requestOptions: RequestOptions = RequestOptions(), private val controller: APIController, ) { @@ -78,6 +80,7 @@ internal constructor( generationConfig: GenerationConfig? = null, safetySettings: List? = null, tools: List? = null, + toolConfig: ToolConfig? = null, requestOptions: RequestOptions = RequestOptions(), ) : this( modelName, @@ -85,6 +88,7 @@ internal constructor( generationConfig, safetySettings, tools, + toolConfig, requestOptions, APIController(apiKey, modelName, requestOptions.toInternal()), ) @@ -225,6 +229,7 @@ internal constructor( safetySettings?.map { it.toInternal() }, generationConfig?.toInternal(), tools?.map { it.toInternal() }, + toolConfig?.toInternal(), ) private fun constructCountTokensRequest(vararg prompt: Content) = diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt index c1b813e5..d2be5aa4 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt @@ -45,11 +45,13 @@ import com.google.ai.client.generativeai.common.shared.SafetySetting import com.google.ai.client.generativeai.common.shared.TextPart import com.google.ai.client.generativeai.type.BlockThreshold import com.google.ai.client.generativeai.type.CitationMetadata +import com.google.ai.client.generativeai.type.FunctionCallingConfig import com.google.ai.client.generativeai.type.FunctionDeclaration import com.google.ai.client.generativeai.type.GenerativeBeta import com.google.ai.client.generativeai.type.ImagePart import com.google.ai.client.generativeai.type.SerializationException import com.google.ai.client.generativeai.type.Tool +import com.google.ai.client.generativeai.type.ToolConfig import com.google.ai.client.generativeai.type.content import java.io.ByteArrayOutputStream import kotlinx.serialization.json.Json @@ -118,6 +120,21 @@ internal fun BlockThreshold.toInternal() = internal fun Tool.toInternal() = com.google.ai.client.generativeai.common.client.Tool(functionDeclarations.map { it.toInternal() }) +@GenerativeBeta +internal fun ToolConfig.toInternal() = + com.google.ai.client.generativeai.common.client.ToolConfig( + com.google.ai.client.generativeai.common.client.FunctionCallingConfig( + when (functionCallingConfig.mode) { + FunctionCallingConfig.Mode.ANY -> + com.google.ai.client.generativeai.common.client.FunctionCallingConfig.Mode.ANY + FunctionCallingConfig.Mode.AUTO -> + com.google.ai.client.generativeai.common.client.FunctionCallingConfig.Mode.AUTO + FunctionCallingConfig.Mode.NONE -> + com.google.ai.client.generativeai.common.client.FunctionCallingConfig.Mode.NONE + } + ) + ) + @GenerativeBeta internal fun FunctionDeclaration.toInternal() = com.google.ai.client.generativeai.common.client.FunctionDeclaration( diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt new file mode 100644 index 00000000..a2da761c --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt @@ -0,0 +1,43 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +/** + * Contains configuration for function calling from the model. This can be used to force function + * calling predictions or disable them. + * + * @param mode The function calling mode of the model + */ +@GenerativeBeta +class FunctionCallingConfig(val mode: Mode) { + enum class Mode { + /** + * The default behavior for function calling. The model calls functions to answer queries at its + * discretion + */ + AUTO, + + /** The model always predicts a provided function call to answer every query. */ + ANY, + + /** + * The model will never predict a function call to answer a query. This can also be achieved by + * not passing any tools to the model. + */ + NONE + } +} diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt new file mode 100644 index 00000000..cc392320 --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt @@ -0,0 +1,34 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +/** + * Contains configuration for the function calling tools of the model. This can be used to change + * when the model can predict function calls. + * + * @param functionCallingConfig The config for function calling + */ +@OptIn(GenerativeBeta::class) +class ToolConfig(val functionCallingConfig: FunctionCallingConfig) { + + companion object { + /** Shorthand to construct a ToolConfig that restricts the model from calling any functions */ + fun never(): ToolConfig = ToolConfig(FunctionCallingConfig(FunctionCallingConfig.Mode.NONE)) + /** Shorthand to construct a ToolConfig that restricts the model to always call some function */ + fun always(): ToolConfig = ToolConfig(FunctionCallingConfig(FunctionCallingConfig.Mode.ANY)) + } +} From 91d69a91aedc731f3417cf74445e4b16e93b6b25 Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Wed, 3 Apr 2024 16:03:38 +0000 Subject: [PATCH 13/41] Make candidateTokenCount optional for cases with no candidate (#104) Co-authored-by: David Motsonashvili --- .../kotlin/com/google/ai/client/generativeai/common/Response.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt index 6f0016ad..009f4743 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt @@ -37,6 +37,6 @@ data class GenerateContentResponse( @Serializable data class UsageMetadata( val promptTokenCount: Int, - val candidatesTokenCount: Int, + val candidatesTokenCount: Int?, val totalTokenCount: Int ) From 6bc885f50287089ca98a87f8df7f7abbbed2b8d5 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 3 Apr 2024 12:28:15 -0400 Subject: [PATCH 14/41] Add clientId parameter in common (#107) This parameter is used to fill the `x-goog-api-client` header --- .../generativeai/common/APIController.kt | 11 ++-- .../generativeai/common/APIControllerTests.kt | 61 +++++++++++++++++-- .../client/generativeai/common/util/tests.kt | 5 +- .../ai/client/generativeai/GenerativeModel.kt | 7 ++- 4 files changed, 72 insertions(+), 12 deletions(-) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt index e9cbae41..257bdfca 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt @@ -59,20 +59,23 @@ val JSON = Json { * Exposed primarily for DI in tests. * @property key The API key used for authentication. * @property model The model to use for generation. + * @property clientId The value to pass in the `x-goog-api-client` header. */ class APIController internal constructor( private val key: String, model: String, private val requestOptions: RequestOptions, - httpEngine: HttpClientEngine + httpEngine: HttpClientEngine, + private val clientId: String ) { constructor( key: String, model: String, - requestOptions: RequestOptions - ) : this(key, model, requestOptions, OkHttp.create()) + requestOptions: RequestOptions, + clientId: String + ) : this(key, model, requestOptions, OkHttp.create(), clientId) private val model = fullModelName(model) @@ -127,7 +130,7 @@ internal constructor( } contentType(ContentType.Application.Json) header("x-goog-api-key", key) - header("x-goog-api-client", "genai-android/${BuildConfig.VERSION_NAME}") + header("x-goog-api-client", clientId) } } diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt index 6318b50c..b30d01f2 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt @@ -45,6 +45,8 @@ import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.Parameterized +private val TEST_CLIENT_ID = "genai-android/test" + internal class APIControllerTests { private val testTimeout = 5.seconds @@ -84,7 +86,13 @@ internal class RequestFormatTests { } prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } val controller = - APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(), + mockEngine, + "genai-android/${BuildConfig.VERSION_NAME}" + ) withTimeout(5.seconds) { controller.generateContentStream(textGenerateContentRequest("cats")).collect { @@ -108,7 +116,8 @@ internal class RequestFormatTests { "super_cool_test_key", "gemini-pro-1.0", RequestOptions(endpoint = "https://my.custom.endpoint"), - mockEngine + mockEngine, + TEST_CLIENT_ID ) withTimeout(5.seconds) { @@ -129,7 +138,13 @@ internal class RequestFormatTests { } prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } val controller = - APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(), + mockEngine, + TEST_CLIENT_ID + ) withTimeout(5.seconds) { controller.generateContentStream(textGenerateContentRequest("cats")).collect { @@ -151,7 +166,13 @@ internal class RequestFormatTests { } val controller = - APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(), + mockEngine, + TEST_CLIENT_ID + ) withTimeout(5.seconds) { controller.countTokens(textCountTokenRequest("cats")) } @@ -160,6 +181,27 @@ internal class RequestFormatTests { requestBodyAsText shouldNotContainJsonKey "model" } + @Test + fun `client id header is set correctly in the request`() = doBlocking { + val response = JSON.encodeToString(CountTokensResponse(totalTokens = 10)) + val mockEngine = MockEngine { + respond(response, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + + val controller = + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(), + mockEngine, + TEST_CLIENT_ID + ) + + withTimeout(5.seconds) { controller.countTokens(textCountTokenRequest("cats")) } + + mockEngine.requestHistory.first().headers["x-goog-api-client"] shouldBe TEST_CLIENT_ID + } + @Test fun `ToolConfig serialization contains correct keys`() = doBlocking { val channel = ByteChannel(autoFlush = true) @@ -169,7 +211,13 @@ internal class RequestFormatTests { prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } val controller = - APIController("super_cool_test_key", "gemini-pro-1.0", RequestOptions(), mockEngine) + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(), + mockEngine, + TEST_CLIENT_ID + ) withTimeout(5.seconds) { controller @@ -203,7 +251,8 @@ internal class ModelNamingTests(private val modelName: String, private val actua respond(channel, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) } prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } - val controller = APIController("super_cool_test_key", modelName, RequestOptions(), mockEngine) + val controller = + APIController("super_cool_test_key", modelName, RequestOptions(), mockEngine, TEST_CLIENT_ID) withTimeout(5.seconds) { controller.generateContentStream(textGenerateContentRequest("cats")).collect { diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt index d753a9bf..0acb8d75 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt @@ -38,6 +38,8 @@ import java.io.File import kotlinx.coroutines.launch import kotlinx.serialization.encodeToString +private val TEST_CLIENT_ID = "genai-android/test" + internal fun prepareStreamingResponse(response: List): List = response.map { "data: ${JSON.encodeToString(it)}$SSE_SEPARATOR".toByteArray() } @@ -104,7 +106,8 @@ internal fun commonTest( val mockEngine = MockEngine { respond(channel, status, headersOf(HttpHeaders.ContentType, "application/json")) } - val apiController = APIController("super_cool_test_key", "gemini-pro", requestOptions, mockEngine) + val apiController = + APIController("super_cool_test_key", "gemini-pro", requestOptions, mockEngine, TEST_CLIENT_ID) CommonTestScope(channel, apiController).block() } diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt index a2f285f1..d1639bb2 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt @@ -90,7 +90,12 @@ internal constructor( tools, toolConfig, requestOptions, - APIController(apiKey, modelName, requestOptions.toInternal()), + APIController( + apiKey, + modelName, + requestOptions.toInternal(), + "genai-android/${BuildConfig.VERSION_NAME}" + ), ) /** From 77483c3f819db4c7ddad9b6afb62cf31f29ab995 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 3 Apr 2024 13:36:43 -0400 Subject: [PATCH 15/41] Use a consistent naming for apiClient (#108) --- .../ai/client/generativeai/common/APIController.kt | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt index 257bdfca..d0f04e34 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt @@ -41,7 +41,6 @@ import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.channelFlow import kotlinx.coroutines.flow.map -import kotlinx.coroutines.flow.timeout import kotlinx.coroutines.launch import kotlinx.serialization.json.Json @@ -59,7 +58,7 @@ val JSON = Json { * Exposed primarily for DI in tests. * @property key The API key used for authentication. * @property model The model to use for generation. - * @property clientId The value to pass in the `x-goog-api-client` header. + * @property apiClient The value to pass in the `x-goog-api-client` header. */ class APIController internal constructor( @@ -67,15 +66,15 @@ internal constructor( model: String, private val requestOptions: RequestOptions, httpEngine: HttpClientEngine, - private val clientId: String + private val apiClient: String ) { constructor( key: String, model: String, requestOptions: RequestOptions, - clientId: String - ) : this(key, model, requestOptions, OkHttp.create(), clientId) + apiClient: String + ) : this(key, model, requestOptions, OkHttp.create(), apiClient) private val model = fullModelName(model) @@ -130,7 +129,7 @@ internal constructor( } contentType(ContentType.Application.Json) header("x-goog-api-key", key) - header("x-goog-api-client", clientId) + header("x-goog-api-client", apiClient) } } From 30050e415fd464b088fedf9a4a7b17d89ef20e43 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 3 Apr 2024 14:45:53 -0400 Subject: [PATCH 16/41] Add `totalBillableCharacters` to `CountTokensResponse` (#106) Also, make the fields optional. --- .changes/baseball-comfort-dock-appliance.json | 1 + .../com/google/ai/client/generativeai/common/Response.kt | 4 +++- .../ai/client/generativeai/common/APIControllerTests.kt | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changes/baseball-comfort-dock-appliance.json diff --git a/.changes/baseball-comfort-dock-appliance.json b/.changes/baseball-comfort-dock-appliance.json new file mode 100644 index 00000000..697a0e89 --- /dev/null +++ b/.changes/baseball-comfort-dock-appliance.json @@ -0,0 +1 @@ +{"type":"MAJOR","changes":["Make totalTokens in CountTokensResponse nullable"]} diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt index 009f4743..ac7cec57 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt @@ -30,7 +30,9 @@ data class GenerateContentResponse( val usageMetadata: UsageMetadata? = null ) : Response -@Serializable data class CountTokensResponse(val totalTokens: Int) : Response +@Serializable +data class CountTokensResponse(val totalTokens: Int, val totalBillableCharacters: Int? = null) : + Response @Serializable data class GRpcErrorResponse(val error: GRpcError) : Response diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt index b30d01f2..959f10dd 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt @@ -160,7 +160,8 @@ internal class RequestFormatTests { @Test fun `countTokenRequest doesn't include the model name`() = doBlocking { - val response = JSON.encodeToString(CountTokensResponse(totalTokens = 10)) + val response = + JSON.encodeToString(CountTokensResponse(totalTokens = 10, totalBillableCharacters = 10)) val mockEngine = MockEngine { respond(response, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) } From 41793443b88523ef3ecdc3b4b0c03b55033d8f46 Mon Sep 17 00:00:00 2001 From: Daymon <17409137+daymxn@users.noreply.github.com> Date: Thu, 4 Apr 2024 12:26:29 -0500 Subject: [PATCH 17/41] Support releasing multiple SDKs (#109) Per [b/330880975](https://b.corp.google.com/issues/330880975), This updates our release infrastructure to support our new multi project repo (with `common` and `generativeai` living next to one another). Now, we can release either in separation of the other. This PR also includes the necessary changes to various tasks, plugins, workflows, tools, and even documentation. More specifically, this PR fixes the following: - [b/332890790](https://b.corp.google.com/issues/332890790) -> Implement a task to generate collective release notes - [b/332891281](https://b.corp.google.com/issues/332891281) -> Implement a task to generative collective api changes - [b/332891563](https://b.corp.google.com/issues/332891563) -> Provide a means for SDKs to generate their release artifacts in isolation of one another - [b/332892199](https://b.corp.google.com/issues/332892199) -> Separate api changes according to sdk - [b/332892499](https://b.corp.google.com/issues/332892499) -> Implement a task to release all sdks with changes - [b/332893058](https://b.corp.google.com/issues/332893058) -> Update the api changes workflow to work for multiple sdks - [b/332894984](https://b.corp.google.com/issues/332894984) -> Update the build release workflow to work for multiple sdks - [b/332897987](https://b.corp.google.com/issues/332897987) -> Update DEVELOPING to reflect the multiple sdk structure - [b/332898189](https://b.corp.google.com/issues/332898189) -> Update change to allow specifying projects --- .../baseball-comfort-dock-appliance.json | 0 .../cloud-camp-bait-calculator.json | 0 .../crowd-birthday-drink-circle.json | 0 .../baseball-comfort-dock-appliance.json | 1 + .../cloud-camp-bait-calculator.json | 1 + .../crowd-birthday-drink-circle.json | 1 + .github/workflows/build_release.yml | 20 +- .github/workflows/check_for_api_changes.yml | 12 +- DEVELOPING.md | 24 +- api/common/0.1.0.api | 1188 +++++++++++++++++ api/{ => generativeai}/0.1.0.api | 0 api/{ => generativeai}/0.1.1.api | 0 api/{ => generativeai}/0.1.2.api | 0 api/{ => generativeai}/0.2.0.api | 0 api/{ => generativeai}/0.2.2.api | 0 build.gradle.kts | 1 + change | 4 + plugins/README.md | 54 +- plugins/build.gradle.kts | 4 + .../com/google/gradle/plugins/ApiPlugin.kt | 3 +- .../google/gradle/plugins/ChangelogPlugin.kt | 29 +- .../gradle/plugins/MultiProjectPlugin.kt | 84 ++ .../google/gradle/plugins/ReleasePlugin.kt | 7 +- .../gradle/tasks/CombineApiChangesTask.kt | 51 + .../gradle/tasks/CombineReleaseNotesTask.kt | 65 + .../gradle/tasks/MakeReleaseNotesTask.kt | 4 +- .../google/gradle/tasks/VersionBumpTask.kt | 2 +- .../gradle/tasks/WarnAboutApiChangesTask.kt | 14 +- .../java/com/google/gradle/util/gradle.kt | 40 +- .../java/com/google/gradle/util/kotlin.kt | 19 + 30 files changed, 1565 insertions(+), 63 deletions(-) rename .changes/{ => common}/baseball-comfort-dock-appliance.json (100%) rename .changes/{ => common}/cloud-camp-bait-calculator.json (100%) rename .changes/{ => common}/crowd-birthday-drink-circle.json (100%) create mode 100644 .changes/generativeai/baseball-comfort-dock-appliance.json create mode 100644 .changes/generativeai/cloud-camp-bait-calculator.json create mode 100644 .changes/generativeai/crowd-birthday-drink-circle.json create mode 100644 api/common/0.1.0.api rename api/{ => generativeai}/0.1.0.api (100%) rename api/{ => generativeai}/0.1.1.api (100%) rename api/{ => generativeai}/0.1.2.api (100%) rename api/{ => generativeai}/0.2.0.api (100%) rename api/{ => generativeai}/0.2.2.api (100%) create mode 100644 plugins/src/main/java/com/google/gradle/plugins/MultiProjectPlugin.kt create mode 100644 plugins/src/main/java/com/google/gradle/tasks/CombineApiChangesTask.kt create mode 100644 plugins/src/main/java/com/google/gradle/tasks/CombineReleaseNotesTask.kt diff --git a/.changes/baseball-comfort-dock-appliance.json b/.changes/common/baseball-comfort-dock-appliance.json similarity index 100% rename from .changes/baseball-comfort-dock-appliance.json rename to .changes/common/baseball-comfort-dock-appliance.json diff --git a/.changes/cloud-camp-bait-calculator.json b/.changes/common/cloud-camp-bait-calculator.json similarity index 100% rename from .changes/cloud-camp-bait-calculator.json rename to .changes/common/cloud-camp-bait-calculator.json diff --git a/.changes/crowd-birthday-drink-circle.json b/.changes/common/crowd-birthday-drink-circle.json similarity index 100% rename from .changes/crowd-birthday-drink-circle.json rename to .changes/common/crowd-birthday-drink-circle.json diff --git a/.changes/generativeai/baseball-comfort-dock-appliance.json b/.changes/generativeai/baseball-comfort-dock-appliance.json new file mode 100644 index 00000000..697a0e89 --- /dev/null +++ b/.changes/generativeai/baseball-comfort-dock-appliance.json @@ -0,0 +1 @@ +{"type":"MAJOR","changes":["Make totalTokens in CountTokensResponse nullable"]} diff --git a/.changes/generativeai/cloud-camp-bait-calculator.json b/.changes/generativeai/cloud-camp-bait-calculator.json new file mode 100644 index 00000000..ddb946a0 --- /dev/null +++ b/.changes/generativeai/cloud-camp-bait-calculator.json @@ -0,0 +1 @@ +{"type":"MAJOR","changes":["Add function calling"]} diff --git a/.changes/generativeai/crowd-birthday-drink-circle.json b/.changes/generativeai/crowd-birthday-drink-circle.json new file mode 100644 index 00000000..a78ade04 --- /dev/null +++ b/.changes/generativeai/crowd-birthday-drink-circle.json @@ -0,0 +1 @@ +{"type":"PATCH","changes":["Implement error catching for unsupported Part types."]} diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 1d3a3170..098b5d20 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -26,11 +26,27 @@ jobs: distribution: 'temurin' java-version: '17' cache: gradle - - name: Perform a Gradle build + - name: Build the generativeai release artifacts run: ./gradlew generativeai:publishAllPublicationsToMavenRepository - - name: Upload generated artifacts + - name: Upload the generativeai artifacts uses: actions/upload-artifact@v2 with: name: generative-ai-android path: generativeai/m2 retention-days: 5 + - name: Build the common release artifacts + run: ./gradlew common:publishAllPublicationsToMavenRepository + - name: Upload the common artifacts + uses: actions/upload-artifact@v2 + with: + name: common-artifacts + path: common/m2 + retention-days: 5 + - name: Build the release artifacts for all sdks + run: ./gradlew publishAllPublicationsToMavenRepository + - name: Upload the generated artifacts + uses: actions/upload-artifact@v2 + with: + name: release-artifacts + path: m2 + retention-days: 5 diff --git a/.github/workflows/check_for_api_changes.yml b/.github/workflows/check_for_api_changes.yml index d27fd2d9..726cb4c7 100644 --- a/.github/workflows/check_for_api_changes.yml +++ b/.github/workflows/check_for_api_changes.yml @@ -20,10 +20,12 @@ jobs: - name: Generate the api file run: | - ./gradlew generativeai:exportApi --no-daemon + ./gradlew exportApi --no-daemon - name: Save public.api from master - run: mv generativeai/public.api ~/public.api + run: | + mv generativeai/public.api ~/generativeai/public.api && \ + mv common/public.api ~/common/public.api - name: Checkout branch uses: actions/checkout@v3.5.3 @@ -36,11 +38,13 @@ jobs: cache: gradle - name: Copy saved api to branch - run: mv ~/public.api generativeai/public.api + run: | + mv ~/generativeai/public.api generativeai/public.api && \ + mv ~/common/public.api common/public.api - name: Run api warning task run: | - ./gradlew generativeai:warnAboutApiChanges --no-daemon + ./gradlew warnAboutApiChanges --no-daemon - name: Add PR Comment if: ${{ hashFiles('api_changes.md') != '' }} diff --git a/DEVELOPING.md b/DEVELOPING.md index 90ea673e..8d7365e8 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -15,15 +15,15 @@ hooks, run the following command at the root of your repo directory: To locally publish the m2 repo: -`./gradlew generativeai:publishToMavenLocal` +`./gradlew publishToMavenLocal` To generate a releasable m2 repo: -`./gradlew generativeai:publishAllPublicationsToMavenRepository` +`./gradlew publishAllPublicationsToMavenRepository` -The m2 repo will be in `generativeai/m2`. +The m2 repo will be in `/m2`. -To generate Dokka: +To generate Dokka for the generativeai project: `./gradlew generativeai:dokkaHtml` @@ -60,6 +60,20 @@ change Both of these commands should generate a new file under the `.changes` directory with your message and impact. +Note though, that this will naturally create release notes for *all* projects. If you only want +to generate a change for the `generativeai` project, then prefix your message with the project name: -To learn more, read the section on our changelog plugin in our [plugin readme](./plugins/README.md). +```bash +change generativeai "hello world!" +``` +You can also do it for other projects as well, just supply the project name: + +```bash +change common "hello world!" +``` + +Although, this does *not* support creating empty changes. You'll have to make that change manually, +if that's what you want. + +To learn more, read the section on our changelog plugin in our [plugin readme](./plugins/README.md). diff --git a/api/common/0.1.0.api b/api/common/0.1.0.api new file mode 100644 index 00000000..b3832966 --- /dev/null +++ b/api/common/0.1.0.api @@ -0,0 +1,1188 @@ +public final class com/google/ai/client/generativeai/common/APIController { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;)V + public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; +} + +public final class com/google/ai/client/generativeai/common/APIControllerKt { + public static final fun getJSON ()Lkotlinx/serialization/json/Json; +} + +public final class com/google/ai/client/generativeai/common/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getModel ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; + public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/Integer;)V + public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/Integer; + public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getTotalBillableCharacters ()Ljava/lang/Integer; + public final fun getTotalTokens ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; + public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun component5 ()Ljava/util/List; + public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun getModel ()Ljava/lang/String; + public final fun getSafetySettings ()Ljava/util/List; + public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun getTools ()Ljava/util/List; + public fun hashCode ()I + public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; + public fun ()V + public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/util/List; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidates ()Ljava/util/List; + public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { + public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { + public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; +} + +public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Request { +} + +public final class com/google/ai/client/generativeai/common/RequestOptions { + public fun ()V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;)V + public fun (Ljava/lang/Long;Ljava/lang/String;)V + public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getApiVersion ()Ljava/lang/String; + public final fun getEndpoint ()Ljava/lang/String; + public final fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Response { +} + +public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun ()V + public fun (Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; + public synthetic fun (IILjava/lang/Integer;ILkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/Integer;I)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/Integer; + public final fun component3 ()I + public final fun copy (ILjava/lang/Integer;I)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Integer;IILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidatesTokenCount ()Ljava/lang/Integer; + public final fun getPromptTokenCount ()I + public final fun getTotalTokenCount ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { + public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; + public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; + public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V + public final fun component1 ()Ljava/lang/Float; + public final fun component2 ()Ljava/lang/Float; + public final fun component3 ()Ljava/lang/Integer; + public final fun component4 ()Ljava/lang/Integer; + public final fun component5 ()Ljava/lang/Integer; + public final fun component6 ()Ljava/util/List; + public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidateCount ()Ljava/lang/Integer; + public final fun getMaxOutputTokens ()Ljava/lang/Integer; + public final fun getStopSequences ()Ljava/util/List; + public final fun getTemperature ()Ljava/lang/Float; + public final fun getTopK ()Ljava/lang/Integer; + public final fun getTopP ()Ljava/lang/Float; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/util/List; + public final fun component5 ()Ljava/util/Map; + public final fun component6 ()Ljava/util/List; + public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getEnum ()Ljava/util/List; + public final fun getFormat ()Ljava/lang/String; + public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun getProperties ()Ljava/util/Map; + public final fun getRequired ()Ljava/util/List; + public final fun getType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionDeclarations ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationSources ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; + public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (IILjava/lang/String;Ljava/lang/String;)V + public final fun component1 ()I + public final fun component2 ()I + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/lang/String; + public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public fun equals (Ljava/lang/Object;)Z + public final fun getEndIndex ()I + public final fun getLicense ()Ljava/lang/String; + public final fun getStartIndex ()I + public final fun getUri ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; + public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; + public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/String;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/String; + public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun equals (Ljava/lang/Object;)Z + public final fun getCode ()I + public final fun getMessage ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; + public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun component2 ()Ljava/util/List; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public final fun component3 ()Ljava/lang/Boolean; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlocked ()Ljava/lang/Boolean; + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; + public fun equals (Ljava/lang/Object;)Z + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileUri ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Map;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun equals (Ljava/lang/Object;)Z + public final fun getArgs ()Ljava/util/Map; + public final fun getName ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Lkotlinx/serialization/json/JsonObject; + public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { + public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; + public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; +} + +public final class com/google/ai/client/generativeai/common/shared/Part$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public fun equals (Ljava/lang/Object;)Z + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getText ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { + public fun (Lkotlin/reflect/KClass;)V + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/util/SerializationKt { + public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; + public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; +} + diff --git a/api/0.1.0.api b/api/generativeai/0.1.0.api similarity index 100% rename from api/0.1.0.api rename to api/generativeai/0.1.0.api diff --git a/api/0.1.1.api b/api/generativeai/0.1.1.api similarity index 100% rename from api/0.1.1.api rename to api/generativeai/0.1.1.api diff --git a/api/0.1.2.api b/api/generativeai/0.1.2.api similarity index 100% rename from api/0.1.2.api rename to api/generativeai/0.1.2.api diff --git a/api/0.2.0.api b/api/generativeai/0.2.0.api similarity index 100% rename from api/0.2.0.api rename to api/generativeai/0.2.0.api diff --git a/api/0.2.2.api b/api/generativeai/0.2.2.api similarity index 100% rename from api/0.2.2.api rename to api/generativeai/0.2.2.api diff --git a/build.gradle.kts b/build.gradle.kts index 2c30b47e..348fc881 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -21,6 +21,7 @@ plugins { kotlin("plugin.serialization") version "1.8.22" apply false id("com.ncorti.ktfmt.gradle") version "0.16.0" apply false id("license-plugin") + id("multi-project-plugin") } license { diff --git a/change b/change index eff4bc35..9adcab34 100755 --- a/change +++ b/change @@ -17,6 +17,10 @@ if [ $# -eq 0 ]; then ./gradlew makeChange elif [ "$1" == "release" ] || [ "$1" == "compile" ]; then ./gradlew makeReleaseNotes +elif [ $# -eq 2 ]; then + PROJECT="$1" + MESSAGE="$2" + ./gradlew ${PROJECT}:makeChange -PchangeMessage="${MESSAGE}" else MESSAGE="$1" ./gradlew makeChange -PchangeMessage="${MESSAGE}" diff --git a/plugins/README.md b/plugins/README.md index 74d7eb03..7e1bcf86 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -1,15 +1,17 @@ # Plugins -This composite module houses the gradle plugins that are used in the main SDK; to assist in a -number of monotonous tasks. You can read more on these plugins and the tasks they create below. +This composite module houses the gradle plugins that are used in all the SDKs in this repo; to +assist in a number of monotonous tasks. You can read more on these plugins and the tasks they +create below. ## ChangelogPlugin -Creates and manages changelog files. These files are used to signify changes made to the repo that +Creates and manages changelog files. These files are used to signify changes made to a project that should invoke a release, alongside text to display in the release notes at release time. -Change files are (by default) created under the `.changes` directory at the root of the repo. -These files are json encoded variants of a [Changelog](./src/main/java/com/google/gradle/types/Changelog.kt) instance- +Change files are (by default) created under the `.changes` directory at the root of the repo. They +are then further filtered into sub directories according to the project name. These files are json +encoded variants of a [Changelog](./src/main/java/com/google/gradle/types/Changelog.kt) instance- which is just an organization of what impact the change had (will it invoke a patch, minor, or major bump?) and an (optional) end-user readable message to show alongside the other changes at release time. By default, the files are saved as a random sequence of four words (to avoid @@ -38,27 +40,27 @@ generated by the `buildApi` task to a file at the project directory named `publi ### Tasks -The ChangelogPlugin registers the four following tasks: +The ChangelogPlugin registers the five following tasks: - [findChanges](./src/main/java/com/google/gradle/tasks/FindChangesTask.kt) -> Creates a new `.api` -file for the current project, and compares it to the existing `released.api` to create a diff of -changes made to the public api. +file for the current project, and compares it to the latest `.api` file in the root `api` directory- +to create a diff of changes made to the public api. - [makeChange](./src/main/java/com/google/gradle/tasks/MakeChangeTask.kt) -> Creates a new `.json` -file in the `.changes` directory with an optional message, including the version impact inferred -from `findChanges`. +file in the root `.changes` directory (under the subdirectory for this project) with an optional +message, including the version impact inferred from `findChanges`. - [warnAboutApiChanges](./src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt) -> If `findChanges` finds changes that will have version implications, this task will create a -`api_changes.md` in the root project's build directory, with a message to display to the developer -regarding what they changed, and the impact it will have on the public API. If no public API changes -are found, this task will just skip itself. +markdown file corresponding to the project's name in the root project's build directory under +`api_changes`, with a message to display to the developer regarding what they changed, and the +impact it will have on the public API. If no public API changes are found, this task will just skip +itself. - [deleteChangeFiles](./src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt) -> Deletes all the change files in the `.changes` directory, intended to be used after the release notes have been created- or otherwise during a cleanup stage of the release. - [makeReleaseNotes](./src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt) -> Creates a -`release_notes.md` in the root project's build directory, containing a collection of all the changes -in the `.changes` directory; including the new project version at the top of file (inferred from the -highest impact change). - +markdown file corresponding to the project's name in the root project's build directory under +`release_notes`, containing a collection of all the changes in the `.changes` directory; including +the new project version at the top of file (inferred from the highest impact change). ## LicensePlugin @@ -91,3 +93,21 @@ notes. `.api` file in the root `api` directory; aligning with the current state of the public api. - [prepareRelease](./src/main/java/com/google/gradle/plugins/ReleasePlugin.kt) -> Does everything needed to prepare a release; creates the release notes and runs the above tasks. + +## MultiProjectPlugin + +Works in conjunction with the `ReleasePlugin` to facilitate a release for all SDKs with changes. + +### Tasks + +The MultiProjectPlugin registers the three following tasks: + +- [warnAboutApiChanges](./src/main/java/com/google/gradle/tasks/CombineApiChangesTask.kt) -> Runs +the `warnAboutApiChanges` task from the `ChangelogPlugin` on each SDK, and then combines their +changes into a single file under the root project's build directory called `api_changes.md`. +- [makeReleaseNotes](./src/main/java/com/google/gradle/tasks/CombineReleaseNotesTask.kt) -> Runs +the `makeReleaseNotes` task from the `ChangelogPlugin` on each SDK, and then combines their +release notes into a single file under the root project's build directory called `release_notes.md`. +- [prepareRelease](./src/main/java/com/google/gradle/plugins/MultiProjectPlugin.kt) -> Does +everything needed to prepare a release for all SDKs; creates the combined release notes and runs the +above tasks. \ No newline at end of file diff --git a/plugins/build.gradle.kts b/plugins/build.gradle.kts index 279c18c6..d0148a03 100644 --- a/plugins/build.gradle.kts +++ b/plugins/build.gradle.kts @@ -49,6 +49,10 @@ gradlePlugin { id = "release-plugin" implementationClass = "com.google.gradle.plugins.ReleasePlugin" } + register("multi-project-plugin") { + id = "multi-project-plugin" + implementationClass = "com.google.gradle.plugins.MultiProjectPlugin" + } } } diff --git a/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt b/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt index f12c2d88..9b215fc8 100644 --- a/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt +++ b/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt @@ -26,7 +26,6 @@ import kotlinx.validation.KotlinApiBuildTask import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.api.provider.Property -import org.gradle.api.tasks.Copy import org.gradle.api.tasks.Optional import org.gradle.kotlin.dsl.create import org.gradle.kotlin.dsl.register @@ -69,7 +68,7 @@ abstract class ApiPlugin : Plugin { context(Project) private fun ApiPluginExtension.commonConfiguration() { - val latestApiFile = rootProject.file("api/${project.version}.api") + val latestApiFile = rootProject.file("api/${project.name}/${project.version}.api") apiFile.convention(latestApiFile) } diff --git a/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt b/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt index 52a8d062..0c22d528 100644 --- a/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt +++ b/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt @@ -25,18 +25,17 @@ import com.google.gradle.types.RandomWordsGenerator import com.google.gradle.util.apply import com.google.gradle.util.buildDir import com.google.gradle.util.childFile +import com.google.gradle.util.file import com.google.gradle.util.moduleVersion import com.google.gradle.util.orElseIfNotExists import com.google.gradle.util.outputFile import com.google.gradle.util.provideProperty import com.google.gradle.util.tempFile -import java.io.File import org.gradle.api.Plugin import org.gradle.api.Project -import org.gradle.api.provider.Property +import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.Delete import org.gradle.api.tasks.Optional -import org.gradle.kotlin.dsl.apply import org.gradle.kotlin.dsl.create import org.gradle.kotlin.dsl.getByType import org.gradle.kotlin.dsl.register @@ -45,12 +44,13 @@ import org.gradle.kotlin.dsl.support.listFilesOrdered /** * A Gradle plugin for managing and creating [Changelog] files. * - * By default, the root `.changes` directory will be used to save change files. + * By default, a subdirectory under the root `.changes` directory that corresponds to the + * [project name][Project.getName] will be used to save change files. * * Will also register the [ApiPlugin] if it's not already present, as it will handle the actual * generation of the API files. * - * Registers four tasks: + * Registers the following tasks: * - `findChanges` * - `makeChange` * - `warnAboutApiChanges` @@ -87,7 +87,7 @@ abstract class ChangelogPlugin : Plugin { tasks.register("makeChange") { val changeMessage = provideProperty("changeMessage") val changeName = RandomWordsGenerator.generateString() - val changeOutput = extension.outputDirectory.childFile("$changeName.json") + val changeOutput = extension.outputDirectory.asFile.childFile("$changeName.json") changesFile.set(fileChanges) message.set(changeMessage) @@ -96,11 +96,11 @@ abstract class ChangelogPlugin : Plugin { tasks.register("warnAboutApiChanges") { changesFile.set(fileChanges) - outputFile.set(rootProject.buildDir("api_changes.md")) + outputFile.set(extension.apiChangesDirectory.asFile) } val changelogFiles = - extension.outputDirectory.map { it.listFilesOrdered { it.extension == "json" } } + extension.outputDirectory.map { it.asFile.listFilesOrdered { it.extension == "json" } } val deleteChangeFiles = tasks.register("deleteChangeFiles") { @@ -114,7 +114,8 @@ abstract class ChangelogPlugin : Plugin { changeFiles.set(changelogFiles) version.set(project.moduleVersion) - outputFile.set(rootProject.buildDir("release_notes.md")) + // TODO() move to extension config with convention (like .changes) + outputFile.set(extension.releaseNotesDirectory) finalizedBy(deleteChangeFiles) } @@ -123,7 +124,9 @@ abstract class ChangelogPlugin : Plugin { context(Project) private fun ChangelogPluginExtension.commonConfiguration() { - outputDirectory.convention(rootProject.file(".changes")) + outputDirectory.convention(rootProject.layout.file(".changes/${project.name}")) + releaseNotesDirectory.convention(rootProject.buildDir("release_notes/${project.name}.md")) + apiChangesDirectory.convention(rootProject.buildDir("api_changes/${project.name}.md")) } } @@ -131,9 +134,13 @@ abstract class ChangelogPlugin : Plugin { * Extension properties for the [ChangelogPlugin]. * * @property outputDirectory The directory into which to store the [Changelog] files + * @property releaseNotesDirectory The directory into which to store the release notes file + * @property apiChangesDirectory The directory into which to store the api changes warning file */ abstract class ChangelogPluginExtension { - @get:Optional abstract val outputDirectory: Property + @get:Optional abstract val outputDirectory: RegularFileProperty + @get:Optional abstract val releaseNotesDirectory: RegularFileProperty + @get:Optional abstract val apiChangesDirectory: RegularFileProperty } /** diff --git a/plugins/src/main/java/com/google/gradle/plugins/MultiProjectPlugin.kt b/plugins/src/main/java/com/google/gradle/plugins/MultiProjectPlugin.kt new file mode 100644 index 00000000..4a6dcbc9 --- /dev/null +++ b/plugins/src/main/java/com/google/gradle/plugins/MultiProjectPlugin.kt @@ -0,0 +1,84 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.gradle.plugins + +import com.google.gradle.tasks.CombineApiChangesTask +import com.google.gradle.tasks.CombineReleaseNotesTask +import com.google.gradle.util.asSingleProvider +import com.google.gradle.util.buildDir +import com.google.gradle.util.outputFile +import org.gradle.api.Plugin +import org.gradle.api.Project +import org.gradle.kotlin.dsl.register + +/** + * Root plugin for facilitating multi-project tasks. + * + * Registers three tasks: + * - `warnAboutApiChanges` -> creates a single file representing the api changes for all child + * projects. + * - `makeReleaseNotes` -> creates a single file representing the release notes for all child + * projects. + * - `prepareRelease` -> performs all the steps necessary to prepare a release. + * + * To learn more about these tasks, you may want to read the documentation under the following + * plugins and tasks: + * + * @see CombineApiChangesTask + * @see CombineReleaseNotesTask + * @see ReleasePlugin + */ +abstract class MultiProjectPlugin : Plugin { + override fun apply(project: Project) { + with(project) { + gradle.projectsEvaluated { + tasks.register("warnAboutApiChanges") { + val apiChangesTasks = subprojects.map { it.tasks.named("warnAboutApiChanges") } + val files = apiChangesTasks.map { it.outputFile }.asSingleProvider() + + // TODO(b/332887819) - Remove when fixed + dependsOn(apiChangesTasks) + + apiChangesFiles.set(files) + outputFile.set(buildDir("api_changes.md")) + } + + val makeReleaseNotesTask = + tasks.register("makeReleaseNotes") { + group = "publishing" + + val releaseNotesTasks = subprojects.map { it.tasks.named("makeReleaseNotes") } + val files = releaseNotesTasks.map { it.outputFile }.asSingleProvider() + + // TODO(b/332887819) - Remove when fixed + dependsOn(releaseNotesTasks) + + releaseNoteFiles.set(files) + outputFile.set(buildDir("release_notes.md")) + } + + tasks.register("prepareRelease") { + group = "publishing" + + val prepareReleaseTasks = subprojects.map { it.tasks.named("prepareRelease") } + + dependsOn(prepareReleaseTasks, makeReleaseNotesTask) + } + } + } + } +} diff --git a/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt b/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt index 71e063a7..021ca4dd 100644 --- a/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt +++ b/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt @@ -27,7 +27,6 @@ import java.io.File import org.gradle.api.Plugin import org.gradle.api.Project import org.gradle.kotlin.dsl.named -import org.gradle.kotlin.dsl.provideDelegate import org.gradle.kotlin.dsl.register /** @@ -55,16 +54,16 @@ abstract class ReleasePlugin : Plugin { val buildApi = tasks.named("buildApi") val makeReleaseNotes = tasks.named("makeReleaseNotes") - val releaseNotes = makeReleaseNotes.outputFile + val releaseNotes = makeReleaseNotes.flatMap { it.outputFile } val releasingVersion = - releaseNotes.map { parseReleaseVersion(it) }.orElse(project.moduleVersion) + releaseNotes.map { parseReleaseVersion(it.asFile) }.orElse(moduleVersion) val updateVersion = tasks.register("updateVersion") { newVersion.set(releasingVersion) } val createNewApiFile = tasks.register("createNewApiFile") { - val newApiFile = releasingVersion.map { rootProject.file("api/$it.api") } + val newApiFile = releasingVersion.map { rootProject.file("api/${project.name}/$it.api") } source.set(buildApi.outputFile) dest.set(newApiFile) diff --git a/plugins/src/main/java/com/google/gradle/tasks/CombineApiChangesTask.kt b/plugins/src/main/java/com/google/gradle/tasks/CombineApiChangesTask.kt new file mode 100644 index 00000000..a4b01f09 --- /dev/null +++ b/plugins/src/main/java/com/google/gradle/tasks/CombineApiChangesTask.kt @@ -0,0 +1,51 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.gradle.tasks + +import com.google.gradle.types.VersionType.* +import com.google.gradle.util.spoiler +import java.io.File +import org.gradle.api.DefaultTask +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.ListProperty +import org.gradle.api.tasks.InputFiles +import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.TaskAction + +/** + * A Gradle task to combine multiple api changes into one. + * + * The [outputFile] will contain the provided [apiChangesFiles] mapped to spoilers for each. + * + * @property apiChangesFiles the api changes to combine + * @property outputFile where to save combined api changes to + */ +abstract class CombineApiChangesTask : DefaultTask() { + @get:InputFiles abstract val apiChangesFiles: ListProperty + + @get:OutputFile abstract val outputFile: RegularFileProperty + + @TaskAction + fun add() { + val projectNameToChangeFile = + apiChangesFiles.get().map { it.nameWithoutExtension to it.readText() } + + val texts = projectNameToChangeFile.joinToString("\n\n") { spoiler(it.first, it.second) } + + outputFile.get().asFile.writeText(texts) + } +} diff --git a/plugins/src/main/java/com/google/gradle/tasks/CombineReleaseNotesTask.kt b/plugins/src/main/java/com/google/gradle/tasks/CombineReleaseNotesTask.kt new file mode 100644 index 00000000..4f1c3837 --- /dev/null +++ b/plugins/src/main/java/com/google/gradle/tasks/CombineReleaseNotesTask.kt @@ -0,0 +1,65 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.gradle.tasks + +import java.io.File +import org.gradle.api.DefaultTask +import org.gradle.api.file.RegularFileProperty +import org.gradle.api.provider.ListProperty +import org.gradle.api.tasks.InputFiles +import org.gradle.api.tasks.OutputFile +import org.gradle.api.tasks.TaskAction + +/** + * A Gradle task to combine multiple release notes into one. + * + * The [outputFile] will contain the provided [releaseNoteFiles] mapped to appropriate markdown + * headers, following the format of: + * ``` + * # {LIBRARY_NAME} + * + * ## {RELEASING_VERSION_FOR_LIBRARY} + * + * - {CHANGES} + * ``` + * + * @property releaseNoteFiles the release notes to combine + * @property outputFile where to save combined release notes to + */ +abstract class CombineReleaseNotesTask : DefaultTask() { + @get:InputFiles abstract val releaseNoteFiles: ListProperty + + @get:OutputFile abstract val outputFile: RegularFileProperty + + @TaskAction + fun add() { + val projectNameToReleaseNotes = + releaseNoteFiles.get().map { it.nameWithoutExtension to it.readText() } + + val texts = + projectNameToReleaseNotes.map { + """ + | # ${it.first} + | + | #${it.second} + """ + .trimMargin() + } + + outputFile.get().asFile.writeText(texts.joinToString("\n\n")) + } +} diff --git a/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt b/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt index b10f4afe..5be24d1c 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt @@ -21,6 +21,7 @@ import com.google.gradle.types.ModuleVersion import com.google.gradle.types.VersionType import java.io.File import org.gradle.api.DefaultTask +import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.Input @@ -47,7 +48,7 @@ abstract class MakeReleaseNotesTask : DefaultTask() { @get:Input abstract val version: Property - @get:OutputFile abstract val outputFile: Property + @get:OutputFile abstract val outputFile: RegularFileProperty @TaskAction fun add() { @@ -59,6 +60,7 @@ abstract class MakeReleaseNotesTask : DefaultTask() { outputFile .get() + .asFile .writeText( """ |# ${version.get().bump(bump)} diff --git a/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt b/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt index 5376f6fa..183cb788 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt @@ -49,7 +49,7 @@ abstract class VersionBumpTask : DefaultTask() { @TaskAction fun build() { - if(newVersion.get().major > 0) + if (newVersion.get().major > 0) throw RuntimeException("You're trying to bump the major version. This is a no 1.0+ zone!!") versionFile.get().rewriteLines { diff --git a/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt b/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt index fa44f40a..b75693f1 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt @@ -19,6 +19,7 @@ package com.google.gradle.tasks import com.google.gradle.types.LinesChanged import com.google.gradle.types.VersionType.* import com.google.gradle.util.SkipTask +import com.google.gradle.util.spoiler import java.io.File import org.gradle.api.DefaultTask import org.gradle.api.provider.Property @@ -84,17 +85,4 @@ abstract class WarnAboutApiChangesTask : DefaultTask() { outputFile.get().writeText(message) } - - private fun spoiler(title: String, content: String) = - """ - |
- | $title - | - |``` - |$content - |``` - | - |
- """ - .trimMargin() } diff --git a/plugins/src/main/java/com/google/gradle/util/gradle.kt b/plugins/src/main/java/com/google/gradle/util/gradle.kt index 3e0f0e87..68b198b3 100644 --- a/plugins/src/main/java/com/google/gradle/util/gradle.kt +++ b/plugins/src/main/java/com/google/gradle/util/gradle.kt @@ -21,6 +21,9 @@ import java.io.File import org.gradle.api.DefaultTask import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.file.FileCollection +import org.gradle.api.file.ProjectLayout +import org.gradle.api.file.RegularFile import org.gradle.api.plugins.PluginContainer import org.gradle.api.provider.Provider import org.gradle.api.tasks.StopActionException @@ -34,8 +37,14 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinAndroidProjectExtension import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmAndroidCompilation import org.jetbrains.kotlin.gradle.utils.provider -/** Creates a file [Provider] mapped for the build directory. */ -fun Project.buildDir(path: String) = layout.buildDirectory.asFile.childFile(path) +/** Creates a [RegularFile] [Provider] mapped for the build directory. */ +fun Project.buildDir(path: String): Provider = layout.buildDirectory.file(path) + +/** Creates a [RegularFile] [Provider] mapped to the project directory. */ +context(Project) +fun ProjectLayout.file(path: String): Provider = provider { + projectDirectory.file(path) +} /** * Submits a piece of work to be executed asynchronously. @@ -107,7 +116,32 @@ typealias SkipTask = StopActionException * outputs. */ val TaskProvider<*>.outputFile: Provider - get() = map { it.outputs.files.asFileTree.first { !it.isDirectory } } + get() = map { it.outputs.files.allChildren().first { !it.isDirectory } } + +/** + * Generates a sequence of [File]s under this collection. + * + * Allows you to lazily compute against a generator of *non directory* children. + * + * In the case that this [FileCollection] is only a single [File] (as in, not a directory), the + * sequence returned will just contain said [File]. + */ +fun FileCollection.allChildren(): Sequence = + asSequence().flatMap { if (it.isDirectory) it.walk().asSequence() else sequenceOf(it) } + +/** + * Zips a list of providers into a provider of lists. + * + * This action is task avoidance friendly- meaning the underlying [Provider] will be a result of + * mapping each [Provider] in the original list against one another. + */ +fun List>.asSingleProvider(): Provider> { + val providerOfLists = map { it.map { listOf(it) } } + + return providerOfLists.reduce { finalProvider, currentProvider -> + finalProvider.zip(currentProvider) { finalList, currentList -> finalList + currentList } + } +} /** The Android extension specific for Kotlin projects within Gradle. */ val Project.android: KotlinAndroidProjectExtension diff --git a/plugins/src/main/java/com/google/gradle/util/kotlin.kt b/plugins/src/main/java/com/google/gradle/util/kotlin.kt index 4c0ceee2..7e48b459 100644 --- a/plugins/src/main/java/com/google/gradle/util/kotlin.kt +++ b/plugins/src/main/java/com/google/gradle/util/kotlin.kt @@ -45,3 +45,22 @@ fun readResourceFile(path: String): List { /** Reads the text from a file if it exists, otherwise returns null. */ fun File.readTextOrNull(): String? = takeIf { exists() }?.readText() + +/** + * Generates a GFM spoiler. + * + * @param title maps to the `` block + * @param content content to put inside code blocks. + */ +fun spoiler(title: String, content: String) = + """ + |
+ | $title + | + |``` + |$content + |``` + | + |
+ """ + .trimMargin() From b65c155d5b1c39ec3b48811d70073ba43ef3364d Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Thu, 4 Apr 2024 16:28:44 -0400 Subject: [PATCH 18/41] Add support for header provider (#110) Co-authored-by: Daymon --- .../generativeai/common/APIController.kt | 130 +++++++++++------- .../generativeai/common/APIControllerTests.kt | 95 ++++++++++++- .../client/generativeai/common/util/tests.kt | 9 +- 3 files changed, 179 insertions(+), 55 deletions(-) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt index d0f04e34..d40d8cff 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt @@ -16,6 +16,7 @@ package com.google.ai.client.generativeai.common +import android.util.Log import com.google.ai.client.generativeai.common.server.FinishReason import com.google.ai.client.generativeai.common.util.decodeToFlow import io.ktor.client.HttpClient @@ -36,12 +37,15 @@ import io.ktor.http.ContentType import io.ktor.http.HttpStatusCode import io.ktor.http.contentType import io.ktor.serialization.kotlinx.json.json +import kotlin.time.Duration import kotlinx.coroutines.CoroutineName +import kotlinx.coroutines.TimeoutCancellationException import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.catch import kotlinx.coroutines.flow.channelFlow import kotlinx.coroutines.flow.map import kotlinx.coroutines.launch +import kotlinx.coroutines.withTimeout import kotlinx.serialization.json.Json val JSON = Json { @@ -59,6 +63,7 @@ val JSON = Json { * @property key The API key used for authentication. * @property model The model to use for generation. * @property apiClient The value to pass in the `x-goog-api-client` header. + * @property headerProvider A provider that generates extra headers to include in all HTTP requests. */ class APIController internal constructor( @@ -66,15 +71,17 @@ internal constructor( model: String, private val requestOptions: RequestOptions, httpEngine: HttpClientEngine, - private val apiClient: String + private val apiClient: String, + private val headerProvider: HeaderProvider? ) { constructor( key: String, model: String, requestOptions: RequestOptions, - apiClient: String - ) : this(key, model, requestOptions, OkHttp.create(), apiClient) + apiClient: String, + headerProvider: HeaderProvider? = null + ) : this(key, model, requestOptions, OkHttp.create(), apiClient, headerProvider) private val model = fullModelName(model) @@ -92,6 +99,7 @@ internal constructor( client .post("${requestOptions.endpoint}/${requestOptions.apiVersion}/$model:generateContent") { applyCommonConfiguration(request) + applyHeaderProvider() } .also { validateResponse(it) } .body() @@ -115,6 +123,7 @@ internal constructor( client .post("${requestOptions.endpoint}/${requestOptions.apiVersion}/$model:countTokens") { applyCommonConfiguration(request) + applyHeaderProvider() } .also { validateResponse(it) } .body() @@ -131,6 +140,77 @@ internal constructor( header("x-goog-api-key", key) header("x-goog-api-client", apiClient) } + + private suspend fun HttpRequestBuilder.applyHeaderProvider() { + if (headerProvider != null) { + try { + withTimeout(headerProvider.timeout) { + for ((tag, value) in headerProvider.generateHeaders()) { + header(tag, value) + } + } + } catch (e: TimeoutCancellationException) { + Log.w(TAG, "HeaderProvided timed out without generating headers, ignoring") + } + } + } + + /** + * Makes a POST request to the specified [url] and returns a [Flow] of deserialized response + * objects of type [R]. The response is expected to be a stream of JSON objects that are parsed in + * real-time as they are received from the server. + * + * This function is intended for internal use within the client that handles streaming responses. + * + * Example usage: + * ``` + * val client: HttpClient = HttpClient(CIO) + * val request: Request = GenerateContentRequest(...) + * val url: String = "http://example.com/stream" + * + * val responses: GenerateContentResponse = client.postStream(url) { + * setBody(request) + * contentType(ContentType.Application.Json) + * } + * responses.collect { + * println("Got a response: $it") + * } + * ``` + * + * @param R The type of the response object. + * @param url The URL to which the POST request will be made. + * @param config An optional [HttpRequestBuilder] callback for request configuration. + * @return A [Flow] of response objects of type [R]. + */ + private inline fun HttpClient.postStream( + url: String, + crossinline config: HttpRequestBuilder.() -> Unit = {}, + ): Flow = channelFlow { + launch(CoroutineName("postStream")) { + preparePost(url) { + applyHeaderProvider() + config() + } + .execute { + validateResponse(it) + + val channel = it.bodyAsChannel() + val flow = JSON.decodeToFlow(channel) + + flow.collect { send(it) } + } + } + } + + companion object { + private val TAG = APIController::class.java.simpleName + } +} + +interface HeaderProvider { + val timeout: Duration + + suspend fun generateHeaders(): Map } /** @@ -140,50 +220,6 @@ internal constructor( */ private fun fullModelName(name: String): String = name.takeIf { it.contains("/") } ?: "models/$name" -/** - * Makes a POST request to the specified [url] and returns a [Flow] of deserialized response objects - * of type [R]. The response is expected to be a stream of JSON objects that are parsed in real-time - * as they are received from the server. - * - * This function is intended for internal use within the client that handles streaming responses. - * - * Example usage: - * ``` - * val client: HttpClient = HttpClient(CIO) - * val request: Request = GenerateContentRequest(...) - * val url: String = "http://example.com/stream" - * - * val responses: GenerateContentResponse = client.postStream(url) { - * setBody(request) - * contentType(ContentType.Application.Json) - * } - * responses.collect { - * println("Got a response: $it") - * } - * ``` - * - * @param R The type of the response object. - * @param url The URL to which the POST request will be made. - * @param config An optional [HttpRequestBuilder] callback for request configuration. - * @return A [Flow] of response objects of type [R]. - */ -private inline fun HttpClient.postStream( - url: String, - crossinline config: HttpRequestBuilder.() -> Unit = {} -): Flow = channelFlow { - launch(CoroutineName("postStream")) { - preparePost(url) { config() } - .execute { - validateResponse(it) - - val channel = it.bodyAsChannel() - val flow = JSON.decodeToFlow(channel) - - flow.collect { send(it) } - } - } -} - private suspend fun validateResponse(response: HttpResponse) { if (response.status == HttpStatusCode.OK) return val text = response.bodyAsText() diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt index 959f10dd..e0f8bb71 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt @@ -38,7 +38,10 @@ import io.ktor.http.headersOf import io.ktor.utils.io.ByteChannel import io.ktor.utils.io.close import io.ktor.utils.io.writeFully +import kotlin.time.Duration +import kotlin.time.Duration.Companion.milliseconds import kotlin.time.Duration.Companion.seconds +import kotlinx.coroutines.delay import kotlinx.coroutines.withTimeout import kotlinx.serialization.encodeToString import org.junit.Test @@ -91,7 +94,8 @@ internal class RequestFormatTests { "gemini-pro-1.0", RequestOptions(), mockEngine, - "genai-android/${BuildConfig.VERSION_NAME}" + "genai-android/${BuildConfig.VERSION_NAME}", + null ) withTimeout(5.seconds) { @@ -117,7 +121,8 @@ internal class RequestFormatTests { "gemini-pro-1.0", RequestOptions(endpoint = "https://my.custom.endpoint"), mockEngine, - TEST_CLIENT_ID + TEST_CLIENT_ID, + null ) withTimeout(5.seconds) { @@ -143,7 +148,8 @@ internal class RequestFormatTests { "gemini-pro-1.0", RequestOptions(), mockEngine, - TEST_CLIENT_ID + TEST_CLIENT_ID, + null ) withTimeout(5.seconds) { @@ -172,7 +178,8 @@ internal class RequestFormatTests { "gemini-pro-1.0", RequestOptions(), mockEngine, - TEST_CLIENT_ID + TEST_CLIENT_ID, + null ) withTimeout(5.seconds) { controller.countTokens(textCountTokenRequest("cats")) } @@ -195,7 +202,8 @@ internal class RequestFormatTests { "gemini-pro-1.0", RequestOptions(), mockEngine, - TEST_CLIENT_ID + TEST_CLIENT_ID, + null ) withTimeout(5.seconds) { controller.countTokens(textCountTokenRequest("cats")) } @@ -217,7 +225,8 @@ internal class RequestFormatTests { "gemini-pro-1.0", RequestOptions(), mockEngine, - TEST_CLIENT_ID + TEST_CLIENT_ID, + null ) withTimeout(5.seconds) { @@ -240,6 +249,71 @@ internal class RequestFormatTests { requestBodyAsText shouldContainJsonKey "tool_config.function_calling_config.mode" } + + @Test + fun `headers from HeaderProvider are added to the request`() = doBlocking { + val response = JSON.encodeToString(CountTokensResponse(totalTokens = 10)) + val mockEngine = MockEngine { + respond(response, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + + val testHeaderProvider = + object : HeaderProvider { + override val timeout: Duration + get() = 5.seconds + + override suspend fun generateHeaders(): Map = + mapOf("header1" to "value1", "header2" to "value2") + } + + val controller = + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(), + mockEngine, + TEST_CLIENT_ID, + testHeaderProvider + ) + + withTimeout(5.seconds) { controller.countTokens(textCountTokenRequest("cats")) } + + mockEngine.requestHistory.first().headers["header1"] shouldBe "value1" + mockEngine.requestHistory.first().headers["header2"] shouldBe "value2" + } + + @Test + fun `headers from HeaderProvider are ignored if timeout`() = doBlocking { + val response = JSON.encodeToString(CountTokensResponse(totalTokens = 10)) + val mockEngine = MockEngine { + respond(response, HttpStatusCode.OK, headersOf(HttpHeaders.ContentType, "application/json")) + } + + val testHeaderProvider = + object : HeaderProvider { + override val timeout: Duration + get() = 5.milliseconds + + override suspend fun generateHeaders(): Map { + delay(10.milliseconds) + return mapOf("header1" to "value1") + } + } + + val controller = + APIController( + "super_cool_test_key", + "gemini-pro-1.0", + RequestOptions(), + mockEngine, + TEST_CLIENT_ID, + testHeaderProvider + ) + + withTimeout(5.seconds) { controller.countTokens(textCountTokenRequest("cats")) } + + mockEngine.requestHistory.first().headers.contains("header1") shouldBe false + } } @RunWith(Parameterized::class) @@ -253,7 +327,14 @@ internal class ModelNamingTests(private val modelName: String, private val actua } prepareStreamingResponse(createResponses("Random")).forEach { channel.writeFully(it) } val controller = - APIController("super_cool_test_key", modelName, RequestOptions(), mockEngine, TEST_CLIENT_ID) + APIController( + "super_cool_test_key", + modelName, + RequestOptions(), + mockEngine, + TEST_CLIENT_ID, + null + ) withTimeout(5.seconds) { controller.generateContentStream(textGenerateContentRequest("cats")).collect { diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt index 0acb8d75..4adee54c 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt @@ -107,7 +107,14 @@ internal fun commonTest( respond(channel, status, headersOf(HttpHeaders.ContentType, "application/json")) } val apiController = - APIController("super_cool_test_key", "gemini-pro", requestOptions, mockEngine, TEST_CLIENT_ID) + APIController( + "super_cool_test_key", + "gemini-pro", + requestOptions, + mockEngine, + TEST_CLIENT_ID, + null + ) CommonTestScope(channel, apiController).block() } From 1fddbab3fc85ca154e26129a023c9c046c7f1d94 Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Fri, 5 Apr 2024 12:52:31 -0700 Subject: [PATCH 19/41] Fix API job for new locations of api (#113) Co-authored-by: David Motsonashvili --- .github/workflows/check_for_api_changes.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check_for_api_changes.yml b/.github/workflows/check_for_api_changes.yml index 726cb4c7..726a8b0b 100644 --- a/.github/workflows/check_for_api_changes.yml +++ b/.github/workflows/check_for_api_changes.yml @@ -24,6 +24,8 @@ jobs: - name: Save public.api from master run: | + mkdir ~/common/ && \ + mkdir ~/generativeai/ && \ mv generativeai/public.api ~/generativeai/public.api && \ mv common/public.api ~/common/public.api From 69b561076d6d95b2e852fd074c2125c2dfa212e3 Mon Sep 17 00:00:00 2001 From: David Motsonashvili Date: Tue, 9 Apr 2024 09:06:01 -0700 Subject: [PATCH 20/41] =?UTF-8?q?add=20SystemInstruction=20as=20a=20param?= =?UTF-8?q?=20to=20GenerativeModel=20and=20wire=20it=20throu=E2=80=A6=20(#?= =?UTF-8?q?112)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit …gh common Co-authored-by: David Motsonashvili Co-authored-by: Rodrigo Lazo --- .../com/google/ai/client/generativeai/common/Request.kt | 1 + .../com/google/ai/client/generativeai/GenerativeModel.kt | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt index 18b7dded..09171a15 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt @@ -35,6 +35,7 @@ data class GenerateContentRequest( @SerialName("generation_config") val generationConfig: GenerationConfig? = null, val tools: List? = null, @SerialName("tool_config") var toolConfig: ToolConfig? = null, + @SerialName("system_instruction") val systemInstruction: Content? = null, ) : Request @Serializable diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt index d1639bb2..84cdfc66 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt @@ -58,6 +58,7 @@ import org.json.JSONObject * @property generationConfig configuration parameters to use for content generation * @property safetySettings the safety bounds to use during alongside prompts during content * generation + * @property systemInstruction contains a [Content] that directs the model to behave a certain way * @property requestOptions configuration options to utilize during backend communication */ @OptIn(ExperimentalSerializationApi::class) @@ -69,6 +70,7 @@ internal constructor( val safetySettings: List? = null, val tools: List? = null, val toolConfig: ToolConfig? = null, + val systemInstruction: Content? = null, val requestOptions: RequestOptions = RequestOptions(), private val controller: APIController, ) { @@ -81,6 +83,7 @@ internal constructor( safetySettings: List? = null, tools: List? = null, toolConfig: ToolConfig? = null, + systemInstruction: Content? = null, requestOptions: RequestOptions = RequestOptions(), ) : this( modelName, @@ -89,12 +92,13 @@ internal constructor( safetySettings, tools, toolConfig, + systemInstruction?.let { Content("system", it.parts) }, requestOptions, APIController( apiKey, modelName, requestOptions.toInternal(), - "genai-android/${BuildConfig.VERSION_NAME}" + "genai-android/${BuildConfig.VERSION_NAME}", ), ) @@ -235,6 +239,7 @@ internal constructor( generationConfig?.toInternal(), tools?.map { it.toInternal() }, toolConfig?.toInternal(), + systemInstruction?.toInternal(), ) private fun constructCountTokensRequest(vararg prompt: Content) = From 753cb331212f14b05911b4e89fa8cc44b0a2e6d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ros=C3=A1rio=20P=2E=20Fernandes?= Date: Tue, 9 Apr 2024 17:23:56 +0100 Subject: [PATCH 21/41] keep GenerativeModel's original parameter positions (#115) It seems like the `tools` and `toolConfig` parameters were added before `requestOptions`, which could cause a breaking change because in the current version of the SDK the `RequestOptions` is in a different order (right after `safetySettings`). --------- Co-authored-by: Rodrigo Lazo --- .changes/generativeai/beginner-car-club-airport.json | 1 + .../java/com/google/ai/client/generativeai/GenerativeModel.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 .changes/generativeai/beginner-car-club-airport.json diff --git a/.changes/generativeai/beginner-car-club-airport.json b/.changes/generativeai/beginner-car-club-airport.json new file mode 100644 index 00000000..86b700c2 --- /dev/null +++ b/.changes/generativeai/beginner-car-club-airport.json @@ -0,0 +1 @@ +{"type":"MAJOR","changes":["Keep argument positions"]} diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt index 84cdfc66..09044103 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt @@ -81,10 +81,10 @@ internal constructor( apiKey: String, generationConfig: GenerationConfig? = null, safetySettings: List? = null, + requestOptions: RequestOptions = RequestOptions(), tools: List? = null, toolConfig: ToolConfig? = null, systemInstruction: Content? = null, - requestOptions: RequestOptions = RequestOptions(), ) : this( modelName, apiKey, From 56cf778dccb153a2e9707372d9211d78ba1db072 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 10 Apr 2024 10:11:55 -0400 Subject: [PATCH 22/41] Bump release versions (#117) Common and GenerativeAI SDKs are both getting a version bump --- .changes/common/baseball-comfort-dock-appliance.json | 1 - .changes/common/cloud-camp-bait-calculator.json | 1 - .changes/common/crowd-birthday-drink-circle.json | 1 - .changes/generativeai/baseball-comfort-dock-appliance.json | 1 - .changes/generativeai/beginner-car-club-airport.json | 1 - .changes/generativeai/cloud-camp-bait-calculator.json | 1 - .changes/generativeai/crowd-birthday-drink-circle.json | 1 - common/gradle.properties | 2 +- generativeai/gradle.properties | 2 +- 9 files changed, 2 insertions(+), 9 deletions(-) delete mode 100644 .changes/common/baseball-comfort-dock-appliance.json delete mode 100644 .changes/common/cloud-camp-bait-calculator.json delete mode 100644 .changes/common/crowd-birthday-drink-circle.json delete mode 100644 .changes/generativeai/baseball-comfort-dock-appliance.json delete mode 100644 .changes/generativeai/beginner-car-club-airport.json delete mode 100644 .changes/generativeai/cloud-camp-bait-calculator.json delete mode 100644 .changes/generativeai/crowd-birthday-drink-circle.json diff --git a/.changes/common/baseball-comfort-dock-appliance.json b/.changes/common/baseball-comfort-dock-appliance.json deleted file mode 100644 index 697a0e89..00000000 --- a/.changes/common/baseball-comfort-dock-appliance.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"MAJOR","changes":["Make totalTokens in CountTokensResponse nullable"]} diff --git a/.changes/common/cloud-camp-bait-calculator.json b/.changes/common/cloud-camp-bait-calculator.json deleted file mode 100644 index ddb946a0..00000000 --- a/.changes/common/cloud-camp-bait-calculator.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"MAJOR","changes":["Add function calling"]} diff --git a/.changes/common/crowd-birthday-drink-circle.json b/.changes/common/crowd-birthday-drink-circle.json deleted file mode 100644 index a78ade04..00000000 --- a/.changes/common/crowd-birthday-drink-circle.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"PATCH","changes":["Implement error catching for unsupported Part types."]} diff --git a/.changes/generativeai/baseball-comfort-dock-appliance.json b/.changes/generativeai/baseball-comfort-dock-appliance.json deleted file mode 100644 index 697a0e89..00000000 --- a/.changes/generativeai/baseball-comfort-dock-appliance.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"MAJOR","changes":["Make totalTokens in CountTokensResponse nullable"]} diff --git a/.changes/generativeai/beginner-car-club-airport.json b/.changes/generativeai/beginner-car-club-airport.json deleted file mode 100644 index 86b700c2..00000000 --- a/.changes/generativeai/beginner-car-club-airport.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"MAJOR","changes":["Keep argument positions"]} diff --git a/.changes/generativeai/cloud-camp-bait-calculator.json b/.changes/generativeai/cloud-camp-bait-calculator.json deleted file mode 100644 index ddb946a0..00000000 --- a/.changes/generativeai/cloud-camp-bait-calculator.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"MAJOR","changes":["Add function calling"]} diff --git a/.changes/generativeai/crowd-birthday-drink-circle.json b/.changes/generativeai/crowd-birthday-drink-circle.json deleted file mode 100644 index a78ade04..00000000 --- a/.changes/generativeai/crowd-birthday-drink-circle.json +++ /dev/null @@ -1 +0,0 @@ -{"type":"PATCH","changes":["Implement error catching for unsupported Part types."]} diff --git a/common/gradle.properties b/common/gradle.properties index de55ab65..caeaf120 100644 --- a/common/gradle.properties +++ b/common/gradle.properties @@ -1 +1 @@ -version=0.1.0 +version=0.2.0 diff --git a/generativeai/gradle.properties b/generativeai/gradle.properties index f4f46191..62044170 100644 --- a/generativeai/gradle.properties +++ b/generativeai/gradle.properties @@ -1 +1 @@ -version=0.2.2 +version=0.3.0 From 287e9bb4db8d88288848757ac90a3dd4677bde24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ros=C3=A1rio=20P=2E=20Fernandes?= Date: Thu, 11 Apr 2024 18:38:42 +0100 Subject: [PATCH 23/41] update sample app to use v0.3.0 (#118) --- generativeai-android-sample/app/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generativeai-android-sample/app/build.gradle.kts b/generativeai-android-sample/app/build.gradle.kts index 9e9fd99f..880d8e83 100644 --- a/generativeai-android-sample/app/build.gradle.kts +++ b/generativeai-android-sample/app/build.gradle.kts @@ -75,5 +75,5 @@ dependencies { debugImplementation("androidx.compose.ui:ui-tooling") debugImplementation("androidx.compose.ui:ui-test-manifest") - implementation("com.google.ai.client.generativeai:generativeai:0.2.2") + implementation("com.google.ai.client.generativeai:generativeai:0.3.0") } From 2d9f5dbed1304248bd635555365f0a7ce6a0478c Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Thu, 18 Apr 2024 13:26:19 -0400 Subject: [PATCH 24/41] Make license optional and default start index to 0 for citations (#120) --- .../generativeai/common/server/Types.kt | 4 +- .../generativeai/common/UnarySnapshotTests.kt | 16 +++++ .../unary/success-citations-nolicense.json | 58 +++++++++++++++++++ .../ai/client/generativeai/type/Candidate.kt | 4 +- .../generativeai/GenerativeModelTests.kt | 33 ++++++++++- 5 files changed, 108 insertions(+), 7 deletions(-) create mode 100644 common/src/test/resources/golden-files/unary/success-citations-nolicense.json diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt index cd5a0d66..ac64049f 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt @@ -63,10 +63,10 @@ constructor(@JsonNames("citations") val citationSources: List) @Serializable data class CitationSources( - val startIndex: Int, + val startIndex: Int = 0, val endIndex: Int, val uri: String, - val license: String + val license: String? = null ) @Serializable diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt index 606986c4..ade65452 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt @@ -133,6 +133,22 @@ internal class UnarySnapshotTests { } } + @Test + fun `citation returns correctly with missing license and startIndex`() = + goldenUnaryFile("success-citations-nolicense.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.citationMetadata?.citationSources?.isNotEmpty() shouldBe true + // Verify the values in the citation source + with(response.candidates?.first()?.citationMetadata?.citationSources?.first()!!) { + license shouldBe null + startIndex shouldBe 0 + } + } + } + @Test fun `response includes usage metadata`() = goldenUnaryFile("success-usage-metadata.json") { diff --git a/common/src/test/resources/golden-files/unary/success-citations-nolicense.json b/common/src/test/resources/golden-files/unary/success-citations-nolicense.json new file mode 100644 index 00000000..b8336b70 --- /dev/null +++ b/common/src/test/resources/golden-files/unary/success-citations-nolicense.json @@ -0,0 +1,58 @@ +{ + "candidates": [ + { + "content": { + "role": "model", + "parts": [ + { + "text": "Some information cited from an external source" + } + ] + }, + "finishReason": "STOP", + "safetyRatings": [ + { + "category": "HARM_CATEGORY_HATE_SPEECH", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.16013464, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.074500255 + }, + { + "category": "HARM_CATEGORY_DANGEROUS_CONTENT", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.09687653, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.049313594 + }, + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.16817278, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.09451043 + }, + { + "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.05023736, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.034553625 + } + ], + "citationMetadata": { + "citations": [ + { + "endIndex": 366, + "uri": "https://www.example.com/some-citation" + } + ] + } + } + ], + "usageMetadata": { + "promptTokenCount": 11, + "candidatesTokenCount": 135, + "totalTokenCount": 146 + } +} \ No newline at end of file diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Candidate.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Candidate.kt index 22b38b17..5d2724aa 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Candidate.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Candidate.kt @@ -41,10 +41,10 @@ class SafetyRating(val category: HarmCategory, val probability: HarmProbability) * @property license The license under which the cited work is distributed. */ class CitationMetadata( - val startIndex: Int, + val startIndex: Int = 0, val endIndex: Int, val uri: String, - val license: String + val license: String? = null ) /** The reason for content finishing. */ diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt b/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt index bfc0b24c..917c72cd 100644 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt +++ b/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt @@ -22,9 +22,12 @@ import com.google.ai.client.generativeai.common.GenerateContentResponse as Gener import com.google.ai.client.generativeai.common.InvalidAPIKeyException as InvalidAPIKeyException_Common import com.google.ai.client.generativeai.common.UnsupportedUserLocationException as UnsupportedUserLocationException_Common import com.google.ai.client.generativeai.common.server.Candidate as Candidate_Common +import com.google.ai.client.generativeai.common.server.CitationMetadata as CitationMetadata_Common +import com.google.ai.client.generativeai.common.server.CitationSources import com.google.ai.client.generativeai.common.shared.Content as Content_Common import com.google.ai.client.generativeai.common.shared.TextPart as TextPart_Common import com.google.ai.client.generativeai.type.Candidate +import com.google.ai.client.generativeai.type.CitationMetadata import com.google.ai.client.generativeai.type.Content import com.google.ai.client.generativeai.type.GenerateContentResponse import com.google.ai.client.generativeai.type.InvalidAPIKeyException @@ -66,7 +69,15 @@ internal class GenerativeModelTests { ), finishReason = null, safetyRatings = listOf(), - citationMetadata = null + citationMetadata = + CitationMetadata_Common( + listOf( + CitationSources( + endIndex = 100, + uri = "http://www.example.com", + ) + ) + ) ) ) ) @@ -77,7 +88,15 @@ internal class GenerativeModelTests { Candidate( Content(parts = listOf(TextPart("I'm still learning how to answer this question"))), safetyRatings = listOf(), - citationMetadata = listOf(), + citationMetadata = + listOf( + CitationMetadata( + startIndex = 0, + endIndex = 100, + uri = "http://www.example.com", + license = null + ) + ), finishReason = null ) ), @@ -91,9 +110,17 @@ internal class GenerativeModelTests { response.candidates[0].shouldBeEqualToUsingFields( expectedResponse.candidates[0], Candidate::finishReason, - Candidate::citationMetadata, Candidate::safetyRatings ) + response.candidates[0] + .citationMetadata[0] + .shouldBeEqualToUsingFields( + expectedResponse.candidates[0].citationMetadata[0], + CitationMetadata::startIndex, + CitationMetadata::endIndex, + CitationMetadata::uri, + CitationMetadata::license, + ) } @Test From 9476b4fd3a9bfb579ae502210521258c5fa013c2 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Fri, 19 Apr 2024 11:59:21 -0400 Subject: [PATCH 25/41] Make v1beta the default api version (#123) Also, update the README to use gemini-1.5-pro-latest --- README.md | 6 +++--- .../google/ai/client/generativeai/common/RequestOptions.kt | 4 ++-- .../google/ai/client/generativeai/type/RequestOptions.kt | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 622b823a..0d18467f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ For example, with just a few lines of code, you can access Gemini's multimodal c ```kotlin val generativeModel = GenerativeModel( - modelName = "gemini-1.0-pro-vision-latest", + modelName = "gemini-1.5-pro-latest", apiKey = BuildConfig.apiKey ) @@ -30,7 +30,7 @@ print(response.text) This repository contains a sample app demonstrating how the SDK can access and utilize the Gemini model for various use cases. -To try out the sample app you can directly import the project from Android Studio +To try out the sample app you can directly import the project from Android Studio via **File > New > Import Sample** and searching for *Generative AI Sample* or follow these steps below: 1. Check out this repository.\ @@ -38,7 +38,7 @@ via **File > New > Import Sample** and searching for *Generative AI Sample* or f 1. [Obtain an API key](https://makersuite.google.com/app/apikey) to use with the Google AI SDKs. -1. Open and build the sample app in the `generativeai-android-sample` folder of this repo. +1. Open and build the sample app in the `generativeai-android-sample` folder of this repo. 1. Paste your API key into the `apiKey` property in the `local.properties` file. diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt index e9ab3a9f..b1da0e49 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt @@ -30,13 +30,13 @@ import kotlin.time.toDuration */ class RequestOptions( val timeout: Duration, - val apiVersion: String = "v1", + val apiVersion: String = "v1beta", val endpoint: String = "https://generativelanguage.googleapis.com", ) { @JvmOverloads constructor( timeout: Long? = HttpTimeout.INFINITE_TIMEOUT_MS, - apiVersion: String = "v1", + apiVersion: String = "v1beta", endpoint: String = "https://generativelanguage.googleapis.com", ) : this( (timeout ?: HttpTimeout.INFINITE_TIMEOUT_MS).toDuration(DurationUnit.MILLISECONDS), diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt index a2470ef2..b12a5cbb 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/RequestOptions.kt @@ -29,12 +29,12 @@ import kotlin.time.toDuration */ class RequestOptions( val timeout: Duration, - val apiVersion: String = "v1", + val apiVersion: String = "v1beta", ) { @JvmOverloads constructor( timeout: Long? = Long.MAX_VALUE, - apiVersion: String = "v1", + apiVersion: String = "v1beta", ) : this( (timeout ?: Long.MAX_VALUE).toDuration(DurationUnit.MILLISECONDS), apiVersion, From c8a0a37871aeeec49073c7afed793c4679a53737 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Fri, 19 Apr 2024 12:11:10 -0400 Subject: [PATCH 26/41] Add support for FileDataPart in the request (#121) We are enabling devs to reference a file in the request, but not ot upload from the Android SDK --------- Co-authored-by: Daymon <17409137+daymxn@users.noreply.github.com> --- .../ai/client/generativeai/internal/util/conversions.kt | 9 +++++++++ .../com/google/ai/client/generativeai/type/Content.kt | 3 +++ .../java/com/google/ai/client/generativeai/type/Part.kt | 7 +++++++ 3 files changed, 19 insertions(+) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt index d2be5aa4..813b03f6 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt @@ -34,6 +34,8 @@ import com.google.ai.client.generativeai.common.server.SafetyRating import com.google.ai.client.generativeai.common.shared.Blob import com.google.ai.client.generativeai.common.shared.BlobPart import com.google.ai.client.generativeai.common.shared.Content +import com.google.ai.client.generativeai.common.shared.FileData +import com.google.ai.client.generativeai.common.shared.FileDataPart import com.google.ai.client.generativeai.common.shared.FunctionCall import com.google.ai.client.generativeai.common.shared.FunctionCallPart import com.google.ai.client.generativeai.common.shared.FunctionResponse @@ -76,6 +78,8 @@ internal fun com.google.ai.client.generativeai.type.Part.toInternal(): Part { FunctionCallPart(FunctionCall(name, args.orEmpty())) is com.google.ai.client.generativeai.type.FunctionResponsePart -> FunctionResponsePart(FunctionResponse(name, response.toInternal())) + is com.google.ai.client.generativeai.type.FileDataPart -> + FileDataPart(FileData(fileUri = uri, mimeType = mimeType)) else -> throw SerializationException( "The given subclass of Part (${javaClass.simpleName}) is not supported in the serialization yet." @@ -197,6 +201,11 @@ internal fun Part.toPublic(): com.google.ai.client.generativeai.type.Part { functionResponse.name, functionResponse.response.toPublic(), ) + is FileDataPart -> + com.google.ai.client.generativeai.type.FileDataPart( + fileData.fileUri, + fileData.mimeType, + ) else -> throw SerializationException( "Unsupported part type \"${javaClass.simpleName}\" provided. This model may not be supported by this SDK." diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Content.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Content.kt index 3ddaa0e1..885df96e 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Content.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Content.kt @@ -40,6 +40,9 @@ class Content @JvmOverloads constructor(val role: String? = "user", val parts: L @JvmName("addImage") fun image(image: Bitmap) = part(ImagePart(image)) + @JvmName("addFileData") + fun fileData(uri: String, mimeType: String) = part(FileDataPart(uri, mimeType)) + fun build(): Content = Content(role, parts) } } diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt index 83f22953..4a65da12 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Part.kt @@ -26,6 +26,7 @@ import org.json.JSONObject * * [TextPart] representing text or string based data. * * [ImagePart] representing image data. * * [BlobPart] representing MIME typed binary data. + * * [FileDataPart] representing MIME typed binary data. */ interface Part @@ -41,6 +42,12 @@ class ImagePart(val image: Bitmap) : Part /** Represents binary data with an associated MIME type sent to and received from requests. */ class BlobPart(val mimeType: String, val blob: ByteArray) : Part +/** Represents an URI-based data with a specified media type. */ +class FileDataPart(val uri: String, val mimeType: String) : Part + +/** @return The part as a [BlobPart] if it represents a blob, and null otherwise */ +fun Part.asFileDataPartOrNull(): FileDataPart? = this as? FileDataPart + /** Represents function call name and params received from requests. */ class FunctionCallPart(val name: String, val args: Map) : Part From 910252b2f80c4448781d98621086813fe5feab29 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Fri, 19 Apr 2024 12:15:00 -0400 Subject: [PATCH 27/41] Add support for SafetyRating.HarmSeverity in common (#122) --- .../generativeai/common/server/Types.kt | 15 +++++- .../generativeai/common/UnarySnapshotTests.kt | 22 ++++++++ .../unary/success-including-severity.json | 50 +++++++++++++++++++ 3 files changed, 86 insertions(+), 1 deletion(-) create mode 100644 common/src/test/resources/golden-files/unary/success-including-severity.json diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt index ac64049f..c7649153 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt @@ -73,7 +73,10 @@ data class CitationSources( data class SafetyRating( val category: HarmCategory, val probability: HarmProbability, - val blocked: Boolean? = null // TODO(): any reason not to default to false? + val blocked: Boolean? = null, // TODO(): any reason not to default to false? + val probabilityScore: Float? = null, + val severity: HarmSeverity? = null, + val severityScore: Float? = null, ) @Serializable(HarmProbabilitySerializer::class) @@ -86,6 +89,16 @@ enum class HarmProbability { HIGH } +@Serializable +enum class HarmSeverity { + UNKNOWN, + @SerialName("HARM_SEVERITY_UNSPECIFIED") UNSPECIFIED, + @SerialName("HARM_SEVERITY_NEGLIGIBLE") NEGLIGIBLE, + @SerialName("HARM_SEVERITY_LOW") LOW, + @SerialName("HARM_SEVERITY_MEDIUM") MEDIUM, + @SerialName("HARM_SEVERITY_HIGH") HIGH +} + @Serializable(FinishReasonSerializer::class) enum class FinishReason { UNKNOWN, diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt index ade65452..f90646c2 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt @@ -18,6 +18,8 @@ package com.google.ai.client.generativeai.common import com.google.ai.client.generativeai.common.server.BlockReason import com.google.ai.client.generativeai.common.server.FinishReason +import com.google.ai.client.generativeai.common.server.HarmProbability +import com.google.ai.client.generativeai.common.server.HarmSeverity import com.google.ai.client.generativeai.common.shared.HarmCategory import com.google.ai.client.generativeai.common.util.goldenUnaryFile import io.kotest.assertions.throwables.shouldThrow @@ -70,6 +72,26 @@ internal class UnarySnapshotTests { } } + @Test + fun `safetyRatings including severity`() = + goldenUnaryFile("success-including-severity.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.safetyRatings?.isEmpty() shouldBe false + response.candidates?.first()?.safetyRatings?.all { + it.probability == HarmProbability.NEGLIGIBLE + } shouldBe true + response.candidates?.first()?.safetyRatings?.all { it.probabilityScore != null } shouldBe + true + response.candidates?.first()?.safetyRatings?.all { + it.severity == HarmSeverity.NEGLIGIBLE + } shouldBe true + response.candidates?.first()?.safetyRatings?.all { it.severityScore != null } shouldBe true + } + } + @Test fun `prompt blocked for safety`() = goldenUnaryFile("failure-prompt-blocked-safety.json") { diff --git a/common/src/test/resources/golden-files/unary/success-including-severity.json b/common/src/test/resources/golden-files/unary/success-including-severity.json new file mode 100644 index 00000000..ccaae7e3 --- /dev/null +++ b/common/src/test/resources/golden-files/unary/success-including-severity.json @@ -0,0 +1,50 @@ +{ + "candidates": [ + { + "content": { + "role": "model", + "parts": [ + { + "text": "## One Thousand and One Nights: A Summary\n\nOne Thousand and One Nights, also known as Arabian Nights, is a collection of Middle Eastern and South Asian stories." + } + ] + }, + "finishReason": "STOP", + "safetyRatings": [ + { + "category": "HARM_CATEGORY_HATE_SPEECH", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.062331032, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.052134257 + }, + { + "category": "HARM_CATEGORY_DANGEROUS_CONTENT", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.04240383, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.06325052 + }, + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.06359858, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.021990221 + }, + { + "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "probability": "NEGLIGIBLE", + "probabilityScore": 0.39030153, + "severity": "HARM_SEVERITY_NEGLIGIBLE", + "severityScore": 0.10650458 + } + ] + } + ], + "usageMetadata": { + "promptTokenCount": 11, + "candidatesTokenCount": 592, + "totalTokenCount": 603 + } +} From 3f253ab41eb19c3e06676db1fad6d36b5bb317c4 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Fri, 19 Apr 2024 12:58:28 -0400 Subject: [PATCH 28/41] Bump generative ai sdk to 0.4.0 (#124) --- api/common/0.2.0.api | 1223 ++++++++++++++++++++++++++++++++ api/generativeai/0.3.0.api | 496 +++++++++++++ common/gradle.properties | 2 +- generativeai/gradle.properties | 2 +- 4 files changed, 1721 insertions(+), 2 deletions(-) create mode 100644 api/common/0.2.0.api create mode 100644 api/generativeai/0.3.0.api diff --git a/api/common/0.2.0.api b/api/common/0.2.0.api new file mode 100644 index 00000000..cce9da22 --- /dev/null +++ b/api/common/0.2.0.api @@ -0,0 +1,1223 @@ +public final class com/google/ai/client/generativeai/common/APIController { + public static final field Companion Lcom/google/ai/client/generativeai/common/APIController$Companion; + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; +} + +public final class com/google/ai/client/generativeai/common/APIController$Companion { +} + +public final class com/google/ai/client/generativeai/common/APIControllerKt { + public static final fun getJSON ()Lkotlinx/serialization/json/Json; +} + +public final class com/google/ai/client/generativeai/common/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getModel ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; + public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/Integer;)V + public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/Integer; + public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getTotalBillableCharacters ()Ljava/lang/Integer; + public final fun getTotalTokens ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; + public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun component5 ()Ljava/util/List; + public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun component7 ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun getModel ()Ljava/lang/String; + public final fun getSafetySettings ()Ljava/util/List; + public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun getTools ()Ljava/util/List; + public fun hashCode ()I + public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; + public fun ()V + public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/util/List; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidates ()Ljava/util/List; + public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { + public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { + public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; +} + +public abstract interface class com/google/ai/client/generativeai/common/HeaderProvider { + public abstract fun generateHeaders (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public abstract fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Request { +} + +public final class com/google/ai/client/generativeai/common/RequestOptions { + public fun ()V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;)V + public fun (Ljava/lang/Long;Ljava/lang/String;)V + public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getApiVersion ()Ljava/lang/String; + public final fun getEndpoint ()Ljava/lang/String; + public final fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Response { +} + +public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun ()V + public fun (Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; + public synthetic fun (IILjava/lang/Integer;ILkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/Integer;I)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/Integer; + public final fun component3 ()I + public final fun copy (ILjava/lang/Integer;I)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Integer;IILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidatesTokenCount ()Ljava/lang/Integer; + public final fun getPromptTokenCount ()I + public final fun getTotalTokenCount ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { + public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; + public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; + public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V + public final fun component1 ()Ljava/lang/Float; + public final fun component2 ()Ljava/lang/Float; + public final fun component3 ()Ljava/lang/Integer; + public final fun component4 ()Ljava/lang/Integer; + public final fun component5 ()Ljava/lang/Integer; + public final fun component6 ()Ljava/util/List; + public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidateCount ()Ljava/lang/Integer; + public final fun getMaxOutputTokens ()Ljava/lang/Integer; + public final fun getStopSequences ()Ljava/util/List; + public final fun getTemperature ()Ljava/lang/Float; + public final fun getTopK ()Ljava/lang/Integer; + public final fun getTopP ()Ljava/lang/Float; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/util/List; + public final fun component5 ()Ljava/util/Map; + public final fun component6 ()Ljava/util/List; + public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getEnum ()Ljava/util/List; + public final fun getFormat ()Ljava/lang/String; + public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun getProperties ()Ljava/util/Map; + public final fun getRequired ()Ljava/util/List; + public final fun getType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionDeclarations ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationSources ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; + public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (IILjava/lang/String;Ljava/lang/String;)V + public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()I + public final fun component2 ()I + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/lang/String; + public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public fun equals (Ljava/lang/Object;)Z + public final fun getEndIndex ()I + public final fun getLicense ()Ljava/lang/String; + public final fun getStartIndex ()I + public final fun getUri ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; + public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; + public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/String;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/String; + public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun equals (Ljava/lang/Object;)Z + public final fun getCode ()I + public final fun getMessage ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; + public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/HarmSeverity : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmSeverity$Companion; + public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmSeverity; +} + +public final class com/google/ai/client/generativeai/common/server/HarmSeverity$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun component2 ()Ljava/util/List; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public final fun component3 ()Ljava/lang/Boolean; + public final fun component4 ()Ljava/lang/Float; + public final fun component5 ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public final fun component6 ()Ljava/lang/Float; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlocked ()Ljava/lang/Boolean; + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public final fun getProbabilityScore ()Ljava/lang/Float; + public final fun getSeverity ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public final fun getSeverityScore ()Ljava/lang/Float; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; + public fun equals (Ljava/lang/Object;)Z + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileUri ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Map;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun equals (Ljava/lang/Object;)Z + public final fun getArgs ()Ljava/util/Map; + public final fun getName ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Lkotlinx/serialization/json/JsonObject; + public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { + public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; + public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; +} + +public final class com/google/ai/client/generativeai/common/shared/Part$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public fun equals (Ljava/lang/Object;)Z + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getText ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { + public fun (Lkotlin/reflect/KClass;)V + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/util/SerializationKt { + public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; + public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; +} + diff --git a/api/generativeai/0.3.0.api b/api/generativeai/0.3.0.api new file mode 100644 index 00000000..5003fe01 --- /dev/null +++ b/api/generativeai/0.3.0.api @@ -0,0 +1,496 @@ +public final class com/google/ai/client/generativeai/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class com/google/ai/client/generativeai/Chat { + public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V + public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getHistory ()Ljava/util/List; + public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; + public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; + public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; +} + +public final class com/google/ai/client/generativeai/GenerativeModel { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeFunction (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; + public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; + public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; + public final fun getApiKey ()Ljava/lang/String; + public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; + public final fun getModelName ()Ljava/lang/String; + public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; + public final fun getSafetySettings ()Ljava/util/List; + public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getToolConfig ()Lcom/google/ai/client/generativeai/type/ToolConfig; + public final fun getTools ()Ljava/util/List; + public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; + public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; +} + +public abstract class com/google/ai/client/generativeai/java/ChatFutures { + public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; + public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; + public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; + public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; +} + +public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { + public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; +} + +public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { + public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; + public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; + public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; + public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; + public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; + public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; +} + +public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { + public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; +} + +public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;[B)V + public final fun getBlob ()[B + public final fun getMimeType ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { + public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; + public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; +} + +public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { + public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; +} + +public final class com/google/ai/client/generativeai/type/Candidate { + public final fun getCitationMetadata ()Ljava/util/List; + public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; + public final fun getSafetyRatings ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/CitationMetadata { + public fun (IILjava/lang/String;Ljava/lang/String;)V + public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getEndIndex ()I + public final fun getLicense ()Ljava/lang/String; + public final fun getStartIndex ()I + public final fun getUri ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/Content { + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/Content$Builder { + public fun ()V + public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addFileData (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun build ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; + public final fun setParts (Ljava/util/List;)V + public final fun setRole (Ljava/lang/String;)V +} + +public final class com/google/ai/client/generativeai/type/ContentKt { + public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; + public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; +} + +public final class com/google/ai/client/generativeai/type/CountTokensResponse { + public fun (I)V + public final fun component1 ()I + public final fun getTotalTokens ()I +} + +public final class com/google/ai/client/generativeai/type/FileDataPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun getMimeType ()Ljava/lang/String; + public final fun getUri ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { + public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; + public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; +} + +public final class com/google/ai/client/generativeai/type/FourParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function5; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam4 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Ljava/util/Map;)V + public final fun getArgs ()Ljava/util/Map; + public final fun getName ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallingConfig { + public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode;)V + public final fun getMode ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallingConfig$Mode : java/lang/Enum { + public static final field ANY Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static final field AUTO Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static final field NONE Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static fun values ()[Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; +} + +public abstract class com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public abstract fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public abstract fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/FunctionDeclarationsKt { + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)Lcom/google/ai/client/generativeai/type/FourParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)Lcom/google/ai/client/generativeai/type/ThreeParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)Lcom/google/ai/client/generativeai/type/TwoParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)Lcom/google/ai/client/generativeai/type/OneParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/NoParameterFunction; +} + +public final class com/google/ai/client/generativeai/type/FunctionParameter { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/FunctionType;)V + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/FunctionResponsePart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Lorg/json/JSONObject;)V + public final fun getName ()Ljava/lang/String; + public final fun getResponse ()Lorg/json/JSONObject; +} + +public final class com/google/ai/client/generativeai/type/FunctionType { + public static final field Companion Lcom/google/ai/client/generativeai/type/FunctionType$Companion; + public fun (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public final fun getName ()Ljava/lang/String; + public final fun getParse ()Lkotlin/jvm/functions/Function1; +} + +public final class com/google/ai/client/generativeai/type/FunctionType$Companion { + public final fun getARRAY ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getBOOLEAN ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getINTEGER ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getNUMBER ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getOBJECT ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getSTRING ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/GenerateContentResponse { + public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V + public final fun getCandidates ()Ljava/util/List; + public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/type/FunctionCallPart; + public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/type/FunctionResponsePart; + public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; + public final fun getText ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig { + public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; + public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getCandidateCount ()Ljava/lang/Integer; + public final fun getMaxOutputTokens ()Ljava/lang/Integer; + public final fun getStopSequences ()Ljava/util/List; + public final fun getTemperature ()Ljava/lang/Float; + public final fun getTopK ()Ljava/lang/Integer; + public final fun getTopP ()Ljava/lang/Float; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { + public field candidateCount Ljava/lang/Integer; + public field maxOutputTokens Ljava/lang/Integer; + public field stopSequences Ljava/util/List; + public field temperature Ljava/lang/Float; + public field topK Ljava/lang/Integer; + public field topP Ljava/lang/Float; + public fun ()V + public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { + public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfigKt { + public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; +} + +public abstract interface annotation class com/google/ai/client/generativeai/type/GenerativeBeta : java/lang/annotation/Annotation { +} + +public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { + public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { + public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; +} + +public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { + public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; + public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; +} + +public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { + public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; + public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; +} + +public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { + public fun (Landroid/graphics/Bitmap;)V + public final fun getImage ()Landroid/graphics/Bitmap; +} + +public final class com/google/ai/client/generativeai/type/InvalidAPIKeyException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/NoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun execute (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function1; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/OneParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function2; + public final fun getParam ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public abstract interface class com/google/ai/client/generativeai/type/Part { +} + +public final class com/google/ai/client/generativeai/type/PartKt { + public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; + public static final fun asFileDataPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/FileDataPart; + public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; + public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/type/PromptFeedback { + public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V + public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; + public final fun getSafetyRatings ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/QuotaExceededException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/RequestOptions { + public fun ()V + public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;)V + public fun (Ljava/lang/Long;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getApiVersion ()Ljava/lang/String; + public final fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/type/SafetyRating { + public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V + public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; + public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; +} + +public final class com/google/ai/client/generativeai/type/SafetySetting { + public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V + public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; + public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; +} + +public final class com/google/ai/client/generativeai/type/Schema { + public static final field Companion Lcom/google/ai/client/generativeai/type/Schema$Companion; + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun fromString (Ljava/lang/String;)Ljava/lang/Object; + public final fun getDescription ()Ljava/lang/String; + public final fun getEnum ()Ljava/util/List; + public final fun getFormat ()Ljava/lang/String; + public final fun getItems ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getName ()Ljava/lang/String; + public final fun getProperties ()Ljava/util/Map; + public final fun getRequired ()Ljava/util/List; + public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/Schema$Companion { + public final fun arr (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun bool (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun enum (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun int (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun num (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun obj (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun str (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; +} + +public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;)V + public final fun getText ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/ThreeParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function4; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/Tool { + public fun (Ljava/util/List;)V + public final fun getFunctionDeclarations ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/ToolConfig { + public static final field Companion Lcom/google/ai/client/generativeai/type/ToolConfig$Companion; + public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig;)V + public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig; +} + +public final class com/google/ai/client/generativeai/type/ToolConfig$Companion { + public final fun always ()Lcom/google/ai/client/generativeai/type/ToolConfig; + public final fun never ()Lcom/google/ai/client/generativeai/type/ToolConfig; +} + +public final class com/google/ai/client/generativeai/type/TwoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function3; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/UnsupportedUserLocationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun ()V + public fun (Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + diff --git a/common/gradle.properties b/common/gradle.properties index caeaf120..62044170 100644 --- a/common/gradle.properties +++ b/common/gradle.properties @@ -1 +1 @@ -version=0.2.0 +version=0.3.0 diff --git a/generativeai/gradle.properties b/generativeai/gradle.properties index 62044170..b31ef9ad 100644 --- a/generativeai/gradle.properties +++ b/generativeai/gradle.properties @@ -1 +1 @@ -version=0.3.0 +version=0.4.0 From 28877bc88b858b32e7d5c6b91e83ec0fd4a22bf3 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Wed, 24 Apr 2024 15:32:46 -0400 Subject: [PATCH 29/41] Update README.md (#125) Add caution section on top --------- Co-authored-by: rachelsaunders <52258509+rachelsaunders@users.noreply.github.com> --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 0d18467f..04533937 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,11 @@ # Google AI SDK for Android + +> [!CAUTION] +> **The Google AI SDK for Android is recommended for prototyping only.** If you plan to enable billing, we strongly recommend that you use a backend SDK to access the Google AI Gemini API. You risk +> potentially exposing your API key to malicious actors if you embed your API key directly in your Android app or fetch it remotely at runtime. + + The Google AI client SDK for Android enables developers to use Google's state-of-the-art generative AI models (like Gemini) to build AI-powered features and applications. This SDK supports use cases like: - Generate text from text-only input - Generate text from text-and-images input (multimodal) From dd2bcafece75c193d83541a075c45268e5963d57 Mon Sep 17 00:00:00 2001 From: Daymon <17409137+daymxn@users.noreply.github.com> Date: Wed, 24 Apr 2024 14:47:51 -0500 Subject: [PATCH 30/41] Fix release plugin (#126) Per [b/333743859](https://b.corp.google.com/issues/333743859), This fixes the issues with the `updateVersion` task properly pulling a dependency on the release notes task, and adds the api files we were previously missing This PR also fixes the following: - [b/336808217](https://b.corp.google.com/issues/336808217) -> Migrate away from file properties --- api/common/0.3.0.api | 1223 +++++++++++++++++ api/generativeai/0.4.0.api | 496 +++++++ plugins/README.md | 5 +- .../com/google/gradle/plugins/ApiPlugin.kt | 34 +- .../google/gradle/plugins/ChangelogPlugin.kt | 50 +- .../google/gradle/plugins/ReleasePlugin.kt | 39 +- .../com/google/gradle/tasks/CopyFileTask.kt | 9 +- .../google/gradle/tasks/FindChangesTask.kt | 13 +- .../com/google/gradle/tasks/MakeChangeTask.kt | 10 +- .../gradle/tasks/MakeReleaseNotesTask.kt | 1 + .../google/gradle/tasks/VersionBumpTask.kt | 12 +- .../gradle/tasks/WarnAboutApiChangesTask.kt | 13 +- .../java/com/google/gradle/util/gradle.kt | 23 +- 13 files changed, 1841 insertions(+), 87 deletions(-) create mode 100644 api/common/0.3.0.api create mode 100644 api/generativeai/0.4.0.api diff --git a/api/common/0.3.0.api b/api/common/0.3.0.api new file mode 100644 index 00000000..cce9da22 --- /dev/null +++ b/api/common/0.3.0.api @@ -0,0 +1,1223 @@ +public final class com/google/ai/client/generativeai/common/APIController { + public static final field Companion Lcom/google/ai/client/generativeai/common/APIController$Companion; + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; +} + +public final class com/google/ai/client/generativeai/common/APIController$Companion { +} + +public final class com/google/ai/client/generativeai/common/APIControllerKt { + public static final fun getJSON ()Lkotlinx/serialization/json/Json; +} + +public final class com/google/ai/client/generativeai/common/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getModel ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; + public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/Integer;)V + public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/Integer; + public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getTotalBillableCharacters ()Ljava/lang/Integer; + public final fun getTotalTokens ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; + public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun component5 ()Ljava/util/List; + public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun component7 ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun getModel ()Ljava/lang/String; + public final fun getSafetySettings ()Ljava/util/List; + public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun getTools ()Ljava/util/List; + public fun hashCode ()I + public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; + public fun ()V + public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/util/List; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidates ()Ljava/util/List; + public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { + public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { + public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; +} + +public abstract interface class com/google/ai/client/generativeai/common/HeaderProvider { + public abstract fun generateHeaders (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public abstract fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Request { +} + +public final class com/google/ai/client/generativeai/common/RequestOptions { + public fun ()V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;)V + public fun (Ljava/lang/Long;Ljava/lang/String;)V + public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getApiVersion ()Ljava/lang/String; + public final fun getEndpoint ()Ljava/lang/String; + public final fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Response { +} + +public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun ()V + public fun (Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; + public synthetic fun (IILjava/lang/Integer;ILkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/Integer;I)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/Integer; + public final fun component3 ()I + public final fun copy (ILjava/lang/Integer;I)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Integer;IILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidatesTokenCount ()Ljava/lang/Integer; + public final fun getPromptTokenCount ()I + public final fun getTotalTokenCount ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { + public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; + public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; + public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V + public final fun component1 ()Ljava/lang/Float; + public final fun component2 ()Ljava/lang/Float; + public final fun component3 ()Ljava/lang/Integer; + public final fun component4 ()Ljava/lang/Integer; + public final fun component5 ()Ljava/lang/Integer; + public final fun component6 ()Ljava/util/List; + public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidateCount ()Ljava/lang/Integer; + public final fun getMaxOutputTokens ()Ljava/lang/Integer; + public final fun getStopSequences ()Ljava/util/List; + public final fun getTemperature ()Ljava/lang/Float; + public final fun getTopK ()Ljava/lang/Integer; + public final fun getTopP ()Ljava/lang/Float; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/util/List; + public final fun component5 ()Ljava/util/Map; + public final fun component6 ()Ljava/util/List; + public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getEnum ()Ljava/util/List; + public final fun getFormat ()Ljava/lang/String; + public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun getProperties ()Ljava/util/Map; + public final fun getRequired ()Ljava/util/List; + public final fun getType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionDeclarations ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationSources ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; + public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (IILjava/lang/String;Ljava/lang/String;)V + public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()I + public final fun component2 ()I + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/lang/String; + public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public fun equals (Ljava/lang/Object;)Z + public final fun getEndIndex ()I + public final fun getLicense ()Ljava/lang/String; + public final fun getStartIndex ()I + public final fun getUri ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; + public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; + public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/String;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/String; + public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun equals (Ljava/lang/Object;)Z + public final fun getCode ()I + public final fun getMessage ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; + public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/HarmSeverity : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmSeverity$Companion; + public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmSeverity; +} + +public final class com/google/ai/client/generativeai/common/server/HarmSeverity$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun component2 ()Ljava/util/List; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public final fun component3 ()Ljava/lang/Boolean; + public final fun component4 ()Ljava/lang/Float; + public final fun component5 ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public final fun component6 ()Ljava/lang/Float; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlocked ()Ljava/lang/Boolean; + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public final fun getProbabilityScore ()Ljava/lang/Float; + public final fun getSeverity ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public final fun getSeverityScore ()Ljava/lang/Float; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; + public fun equals (Ljava/lang/Object;)Z + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileUri ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Map;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun equals (Ljava/lang/Object;)Z + public final fun getArgs ()Ljava/util/Map; + public final fun getName ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Lkotlinx/serialization/json/JsonObject; + public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { + public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; + public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; +} + +public final class com/google/ai/client/generativeai/common/shared/Part$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public fun equals (Ljava/lang/Object;)Z + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getText ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { + public fun (Lkotlin/reflect/KClass;)V + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/util/SerializationKt { + public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; + public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; +} + diff --git a/api/generativeai/0.4.0.api b/api/generativeai/0.4.0.api new file mode 100644 index 00000000..5003fe01 --- /dev/null +++ b/api/generativeai/0.4.0.api @@ -0,0 +1,496 @@ +public final class com/google/ai/client/generativeai/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class com/google/ai/client/generativeai/Chat { + public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V + public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getHistory ()Ljava/util/List; + public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; + public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; + public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; +} + +public final class com/google/ai/client/generativeai/GenerativeModel { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeFunction (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; + public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; + public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; + public final fun getApiKey ()Ljava/lang/String; + public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; + public final fun getModelName ()Ljava/lang/String; + public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; + public final fun getSafetySettings ()Ljava/util/List; + public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getToolConfig ()Lcom/google/ai/client/generativeai/type/ToolConfig; + public final fun getTools ()Ljava/util/List; + public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; + public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; +} + +public abstract class com/google/ai/client/generativeai/java/ChatFutures { + public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; + public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; + public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; + public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; +} + +public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { + public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; +} + +public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { + public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; + public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; + public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; + public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; + public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; + public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; +} + +public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { + public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; +} + +public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;[B)V + public final fun getBlob ()[B + public final fun getMimeType ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { + public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; + public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; +} + +public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { + public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; +} + +public final class com/google/ai/client/generativeai/type/Candidate { + public final fun getCitationMetadata ()Ljava/util/List; + public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; + public final fun getSafetyRatings ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/CitationMetadata { + public fun (IILjava/lang/String;Ljava/lang/String;)V + public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getEndIndex ()I + public final fun getLicense ()Ljava/lang/String; + public final fun getStartIndex ()I + public final fun getUri ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/Content { + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/Content$Builder { + public fun ()V + public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addFileData (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun build ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; + public final fun setParts (Ljava/util/List;)V + public final fun setRole (Ljava/lang/String;)V +} + +public final class com/google/ai/client/generativeai/type/ContentKt { + public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; + public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; +} + +public final class com/google/ai/client/generativeai/type/CountTokensResponse { + public fun (I)V + public final fun component1 ()I + public final fun getTotalTokens ()I +} + +public final class com/google/ai/client/generativeai/type/FileDataPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun getMimeType ()Ljava/lang/String; + public final fun getUri ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { + public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; + public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; +} + +public final class com/google/ai/client/generativeai/type/FourParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function5; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam4 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Ljava/util/Map;)V + public final fun getArgs ()Ljava/util/Map; + public final fun getName ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallingConfig { + public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode;)V + public final fun getMode ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallingConfig$Mode : java/lang/Enum { + public static final field ANY Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static final field AUTO Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static final field NONE Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static fun values ()[Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; +} + +public abstract class com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public abstract fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public abstract fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/FunctionDeclarationsKt { + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)Lcom/google/ai/client/generativeai/type/FourParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)Lcom/google/ai/client/generativeai/type/ThreeParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)Lcom/google/ai/client/generativeai/type/TwoParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)Lcom/google/ai/client/generativeai/type/OneParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/NoParameterFunction; +} + +public final class com/google/ai/client/generativeai/type/FunctionParameter { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/FunctionType;)V + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/FunctionResponsePart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Lorg/json/JSONObject;)V + public final fun getName ()Ljava/lang/String; + public final fun getResponse ()Lorg/json/JSONObject; +} + +public final class com/google/ai/client/generativeai/type/FunctionType { + public static final field Companion Lcom/google/ai/client/generativeai/type/FunctionType$Companion; + public fun (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public final fun getName ()Ljava/lang/String; + public final fun getParse ()Lkotlin/jvm/functions/Function1; +} + +public final class com/google/ai/client/generativeai/type/FunctionType$Companion { + public final fun getARRAY ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getBOOLEAN ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getINTEGER ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getNUMBER ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getOBJECT ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getSTRING ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/GenerateContentResponse { + public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V + public final fun getCandidates ()Ljava/util/List; + public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/type/FunctionCallPart; + public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/type/FunctionResponsePart; + public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; + public final fun getText ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig { + public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; + public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getCandidateCount ()Ljava/lang/Integer; + public final fun getMaxOutputTokens ()Ljava/lang/Integer; + public final fun getStopSequences ()Ljava/util/List; + public final fun getTemperature ()Ljava/lang/Float; + public final fun getTopK ()Ljava/lang/Integer; + public final fun getTopP ()Ljava/lang/Float; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { + public field candidateCount Ljava/lang/Integer; + public field maxOutputTokens Ljava/lang/Integer; + public field stopSequences Ljava/util/List; + public field temperature Ljava/lang/Float; + public field topK Ljava/lang/Integer; + public field topP Ljava/lang/Float; + public fun ()V + public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { + public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfigKt { + public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; +} + +public abstract interface annotation class com/google/ai/client/generativeai/type/GenerativeBeta : java/lang/annotation/Annotation { +} + +public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { + public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { + public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; +} + +public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { + public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; + public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; +} + +public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { + public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; + public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; +} + +public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { + public fun (Landroid/graphics/Bitmap;)V + public final fun getImage ()Landroid/graphics/Bitmap; +} + +public final class com/google/ai/client/generativeai/type/InvalidAPIKeyException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/NoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun execute (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function1; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/OneParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function2; + public final fun getParam ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public abstract interface class com/google/ai/client/generativeai/type/Part { +} + +public final class com/google/ai/client/generativeai/type/PartKt { + public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; + public static final fun asFileDataPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/FileDataPart; + public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; + public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/type/PromptFeedback { + public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V + public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; + public final fun getSafetyRatings ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/QuotaExceededException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/RequestOptions { + public fun ()V + public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;)V + public fun (Ljava/lang/Long;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getApiVersion ()Ljava/lang/String; + public final fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/type/SafetyRating { + public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V + public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; + public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; +} + +public final class com/google/ai/client/generativeai/type/SafetySetting { + public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V + public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; + public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; +} + +public final class com/google/ai/client/generativeai/type/Schema { + public static final field Companion Lcom/google/ai/client/generativeai/type/Schema$Companion; + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun fromString (Ljava/lang/String;)Ljava/lang/Object; + public final fun getDescription ()Ljava/lang/String; + public final fun getEnum ()Ljava/util/List; + public final fun getFormat ()Ljava/lang/String; + public final fun getItems ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getName ()Ljava/lang/String; + public final fun getProperties ()Ljava/util/Map; + public final fun getRequired ()Ljava/util/List; + public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/Schema$Companion { + public final fun arr (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun bool (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun enum (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun int (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun num (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun obj (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun str (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; +} + +public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;)V + public final fun getText ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/ThreeParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function4; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/Tool { + public fun (Ljava/util/List;)V + public final fun getFunctionDeclarations ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/ToolConfig { + public static final field Companion Lcom/google/ai/client/generativeai/type/ToolConfig$Companion; + public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig;)V + public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig; +} + +public final class com/google/ai/client/generativeai/type/ToolConfig$Companion { + public final fun always ()Lcom/google/ai/client/generativeai/type/ToolConfig; + public final fun never ()Lcom/google/ai/client/generativeai/type/ToolConfig; +} + +public final class com/google/ai/client/generativeai/type/TwoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function3; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/UnsupportedUserLocationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun ()V + public fun (Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + diff --git a/plugins/README.md b/plugins/README.md index 7e1bcf86..05893193 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -110,4 +110,7 @@ the `makeReleaseNotes` task from the `ChangelogPlugin` on each SDK, and then com release notes into a single file under the root project's build directory called `release_notes.md`. - [prepareRelease](./src/main/java/com/google/gradle/plugins/MultiProjectPlugin.kt) -> Does everything needed to prepare a release for all SDKs; creates the combined release notes and runs the -above tasks. \ No newline at end of file +above tasks (and also deletes the excess change files). +- [release](./src/main/java/com/google/gradle/plugins/ReleasePlugin.kt) Publishes the *current* +artifacts to maven local and the configured maven repository. Should be ran *after* +`prepareRelease`. diff --git a/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt b/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt index 9b215fc8..d94442f3 100644 --- a/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt +++ b/plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt @@ -18,16 +18,18 @@ package com.google.gradle.plugins import com.google.gradle.tasks.CopyFileTask import com.google.gradle.util.android -import com.google.gradle.util.outputFile +import com.google.gradle.util.apply +import com.google.gradle.util.file +import com.google.gradle.util.regularOutputFile import com.google.gradle.util.release import com.google.gradle.util.tempFile -import java.io.File import kotlinx.validation.KotlinApiBuildTask import org.gradle.api.Plugin import org.gradle.api.Project -import org.gradle.api.provider.Property +import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.Optional import org.gradle.kotlin.dsl.create +import org.gradle.kotlin.dsl.getByType import org.gradle.kotlin.dsl.register typealias BuildApiTask = KotlinApiBuildTask @@ -46,13 +48,13 @@ typealias BuildApiTask = KotlinApiBuildTask abstract class ApiPlugin : Plugin { override fun apply(project: Project) { with(project) { - extensions.create("api").apply { commonConfiguration() } + val extension = extensions.create("api").apply { commonConfiguration() } val buildApi = registerBuildApiTask() tasks.register("exportApi") { - source.set(buildApi.outputFile) - dest.set(project.file("public.api")) + source.set(buildApi.regularOutputFile) + dest.set(extension.exportFile) } } } @@ -63,14 +65,15 @@ abstract class ApiPlugin : Plugin { inputClassesDirs = files(classes) inputDependencies = files(classes) - outputApiDir = tempFile("api").get() + outputApiDir = tempFile("api").get().asFile } context(Project) private fun ApiPluginExtension.commonConfiguration() { - val latestApiFile = rootProject.file("api/${project.name}/${project.version}.api") + val latestApiFile = rootProject.layout.file("api/${project.name}/${project.version}.api") apiFile.convention(latestApiFile) + exportFile.convention(project.layout.file("public.api")) } } @@ -78,7 +81,20 @@ abstract class ApiPlugin : Plugin { * Extension properties for the [ApiPlugin]. * * @property apiFile The file to reference to for the publicly released api. + * @property exportFile The file to export the api to when running exportApi. */ abstract class ApiPluginExtension { - @get:Optional abstract val apiFile: Property + @get:Optional abstract val apiFile: RegularFileProperty + @get:Optional abstract val exportFile: RegularFileProperty } + +/** + * Helper mapping to the [ApiPluginExtension]. + * + * Automatically applies the [ApiPlugin] if not already present. + */ +val Project.apiPlugin: ApiPluginExtension + get() { + plugins.apply() + return extensions.getByType() + } diff --git a/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt b/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt index 0c22d528..fb6b7d86 100644 --- a/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt +++ b/plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt @@ -30,6 +30,7 @@ import com.google.gradle.util.moduleVersion import com.google.gradle.util.orElseIfNotExists import com.google.gradle.util.outputFile import com.google.gradle.util.provideProperty +import com.google.gradle.util.regularOutputFile import com.google.gradle.util.tempFile import org.gradle.api.Plugin import org.gradle.api.Project @@ -37,7 +38,6 @@ import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.Delete import org.gradle.api.tasks.Optional import org.gradle.kotlin.dsl.create -import org.gradle.kotlin.dsl.getByType import org.gradle.kotlin.dsl.register import org.gradle.kotlin.dsl.support.listFilesOrdered @@ -71,9 +71,8 @@ abstract class ChangelogPlugin : Plugin { val extension = extensions.create("changelog").apply { commonConfiguration() } - val exportedApiFile = provider { file("public.api") } - val releasedApiFile = exportedApiFile.orElseIfNotExists(apiPlugin.apiFile) - val newApiFile = tasks.named("buildApi").outputFile + val releasedApiFile = apiPlugin.exportFile.orElseIfNotExists(apiPlugin.apiFile) + val newApiFile = tasks.named("buildApi").regularOutputFile val findChanges = tasks.register("findChanges") { @@ -82,12 +81,12 @@ abstract class ChangelogPlugin : Plugin { outputFile.set(tempFile("changes")) } - val fileChanges = findChanges.outputFile + val fileChanges = findChanges.regularOutputFile tasks.register("makeChange") { val changeMessage = provideProperty("changeMessage") val changeName = RandomWordsGenerator.generateString() - val changeOutput = extension.outputDirectory.asFile.childFile("$changeName.json") + val changeOutput = extension.outputDirectory.childFile("$changeName.json") changesFile.set(fileChanges) message.set(changeMessage) @@ -96,28 +95,24 @@ abstract class ChangelogPlugin : Plugin { tasks.register("warnAboutApiChanges") { changesFile.set(fileChanges) - outputFile.set(extension.apiChangesDirectory.asFile) + outputFile.set(extension.apiChangesFile) } val changelogFiles = extension.outputDirectory.map { it.asFile.listFilesOrdered { it.extension == "json" } } - val deleteChangeFiles = - tasks.register("deleteChangeFiles") { - group = "cleanup" + tasks.register("deleteChangeFiles") { + group = "cleanup" - delete(changelogFiles) - } + delete(changelogFiles) + } tasks.register("makeReleaseNotes") { onlyIf("No changelog files found") { changelogFiles.get().isNotEmpty() } changeFiles.set(changelogFiles) version.set(project.moduleVersion) - // TODO() move to extension config with convention (like .changes) - outputFile.set(extension.releaseNotesDirectory) - - finalizedBy(deleteChangeFiles) + outputFile.set(extension.releaseNotesFile) } } } @@ -125,8 +120,8 @@ abstract class ChangelogPlugin : Plugin { context(Project) private fun ChangelogPluginExtension.commonConfiguration() { outputDirectory.convention(rootProject.layout.file(".changes/${project.name}")) - releaseNotesDirectory.convention(rootProject.buildDir("release_notes/${project.name}.md")) - apiChangesDirectory.convention(rootProject.buildDir("api_changes/${project.name}.md")) + releaseNotesFile.convention(rootProject.buildDir("release_notes/${project.name}.md")) + apiChangesFile.convention(rootProject.buildDir("api_changes/${project.name}.md")) } } @@ -134,22 +129,11 @@ abstract class ChangelogPlugin : Plugin { * Extension properties for the [ChangelogPlugin]. * * @property outputDirectory The directory into which to store the [Changelog] files - * @property releaseNotesDirectory The directory into which to store the release notes file - * @property apiChangesDirectory The directory into which to store the api changes warning file + * @property releaseNotesFile The file into which to save the release notes to + * @property apiChangesFile The file into which to save the api changes warning to */ abstract class ChangelogPluginExtension { @get:Optional abstract val outputDirectory: RegularFileProperty - @get:Optional abstract val releaseNotesDirectory: RegularFileProperty - @get:Optional abstract val apiChangesDirectory: RegularFileProperty + @get:Optional abstract val releaseNotesFile: RegularFileProperty + @get:Optional abstract val apiChangesFile: RegularFileProperty } - -/** - * Helper mapping to the [ApiPluginExtension]. - * - * Automatically applies the [ApiPlugin] if not already present. - */ -private val Project.apiPlugin: ApiPluginExtension - get() { - plugins.apply() - return extensions.getByType() - } diff --git a/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt b/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt index 021ca4dd..e252ef51 100644 --- a/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt +++ b/plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt @@ -20,27 +20,30 @@ import com.google.gradle.tasks.CopyFileTask import com.google.gradle.tasks.MakeReleaseNotesTask import com.google.gradle.tasks.VersionBumpTask import com.google.gradle.types.ModuleVersion +import com.google.gradle.util.file import com.google.gradle.util.moduleVersion import com.google.gradle.util.outputFile import com.google.gradle.util.readFirstLine +import com.google.gradle.util.regularOutputFile import java.io.File import org.gradle.api.Plugin import org.gradle.api.Project +import org.gradle.api.tasks.Delete import org.gradle.kotlin.dsl.named import org.gradle.kotlin.dsl.register /** - * A Gradle plugin for preparing a release. + * A Gradle plugin for releasing projects. * - * Intended to be ran before running `publishAllPublicationsToMavenRepository`. - * - * Registers three tasks: + * Registers four tasks: * - `updateVersion` -> updates the project version declared in `gradle.properties` file, according * to the release notes. * - `createNewApiFile` -> creates a new `.api` file in the `api` directory for the release, * aligning with the current state of the public api; for future auditing. - * - `prepareRelease` -> does everything needed to prepare a release; creates the release notes and - * runs the above tasks. + * - `prepareRelease` -> does everything needed to prepare a release; creates the release notes, + * runs the above tasks, and deletes the left over change files. + * - `release` -> publishes the *current* artifacts to maven local and the configured maven + * repository * * If any of these tasks are ran without changelog files present, the current version declared in * the `gradle.properties` file will be used instead. @@ -53,26 +56,42 @@ abstract class ReleasePlugin : Plugin { with(project) { val buildApi = tasks.named("buildApi") val makeReleaseNotes = tasks.named("makeReleaseNotes") + val deleteChangeFiles = tasks.named("deleteChangeFiles") val releaseNotes = makeReleaseNotes.flatMap { it.outputFile } val releasingVersion = releaseNotes.map { parseReleaseVersion(it.asFile) }.orElse(moduleVersion) val updateVersion = - tasks.register("updateVersion") { newVersion.set(releasingVersion) } + tasks.register("updateVersion") { + dependsOn(makeReleaseNotes) + + newVersion.set(releasingVersion) + } val createNewApiFile = tasks.register("createNewApiFile") { - val newApiFile = releasingVersion.map { rootProject.file("api/${project.name}/$it.api") } + dependsOn(makeReleaseNotes) + + val releasingFile = + releasingVersion.flatMap { rootProject.layout.file("api/${project.name}/$it.api") } - source.set(buildApi.outputFile) - dest.set(newApiFile) + source.set(buildApi.regularOutputFile) + dest.set(releasingFile) } tasks.register("prepareRelease") { group = "publishing" dependsOn(makeReleaseNotes, updateVersion, createNewApiFile) + finalizedBy(deleteChangeFiles) + } + + tasks.register("release") { + group = "publishing" + + dependsOn("publishReleasePublicationToMavenRepository") + dependsOn("publishReleasePublicationToMavenLocal") } } } diff --git a/plugins/src/main/java/com/google/gradle/tasks/CopyFileTask.kt b/plugins/src/main/java/com/google/gradle/tasks/CopyFileTask.kt index d079cac2..dd1af0a4 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/CopyFileTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/CopyFileTask.kt @@ -16,9 +16,8 @@ package com.google.gradle.tasks -import java.io.File import org.gradle.api.DefaultTask -import org.gradle.api.provider.Property +import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.Copy import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.OutputFile @@ -39,12 +38,12 @@ import org.gradle.api.tasks.TaskAction * @property dest where to copy the file or directory to */ abstract class CopyFileTask : DefaultTask() { - @get:InputFile abstract val source: Property + @get:InputFile abstract val source: RegularFileProperty - @get:OutputFile abstract val dest: Property + @get:OutputFile abstract val dest: RegularFileProperty @TaskAction fun create() { - source.get().copyRecursively(dest.get(), overwrite = true) + source.get().asFile.copyRecursively(dest.asFile.get(), overwrite = true) } } diff --git a/plugins/src/main/java/com/google/gradle/tasks/FindChangesTask.kt b/plugins/src/main/java/com/google/gradle/tasks/FindChangesTask.kt index 3f931638..58d40f3a 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/FindChangesTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/FindChangesTask.kt @@ -18,9 +18,8 @@ package com.google.gradle.tasks import com.google.gradle.types.LinesChanged import com.google.gradle.types.changedFrom -import java.io.File import org.gradle.api.DefaultTask -import org.gradle.api.provider.Property +import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.TaskAction @@ -36,16 +35,16 @@ import org.gradle.api.tasks.TaskAction * @property outputFile where to save the diff to */ abstract class FindChangesTask : DefaultTask() { - @get:InputFile abstract val old: Property + @get:InputFile abstract val old: RegularFileProperty - @get:InputFile abstract val new: Property + @get:InputFile abstract val new: RegularFileProperty - @get:OutputFile abstract val outputFile: Property + @get:OutputFile abstract val outputFile: RegularFileProperty @TaskAction fun add() { - val diff = old.get().changedFrom(new.get()) + val diff = old.asFile.get().changedFrom(new.asFile.get()) - diff.toFile(outputFile.get()) + diff.toFile(outputFile.asFile.get()) } } diff --git a/plugins/src/main/java/com/google/gradle/tasks/MakeChangeTask.kt b/plugins/src/main/java/com/google/gradle/tasks/MakeChangeTask.kt index 06d84f30..cdaf7a47 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/MakeChangeTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/MakeChangeTask.kt @@ -20,8 +20,8 @@ import com.google.gradle.types.Changelog import com.google.gradle.types.LinesChanged import com.google.gradle.types.RandomWordsGenerator import com.google.gradle.types.VersionType -import java.io.File import org.gradle.api.DefaultTask +import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFile @@ -44,18 +44,18 @@ import org.gradle.api.tasks.TaskAction * @see [RandomWordsGenerator] */ abstract class MakeChangeTask : DefaultTask() { - @get:InputFile abstract val changesFile: Property + @get:InputFile abstract val changesFile: RegularFileProperty @get:[Optional Input] abstract val message: Property - @get:OutputFile abstract val outputFile: Property + @get:OutputFile abstract val outputFile: RegularFileProperty @TaskAction fun add() { - val diff = LinesChanged.fromFile(changesFile.get()) + val diff = LinesChanged.fromFile(changesFile.asFile.get()) val changelog = Changelog(diff.bump, listOfNotNull(message.orNull)) - changelog.toFile(outputFile.get()) + changelog.toFile(outputFile.asFile.get()) } } diff --git a/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt b/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt index 5be24d1c..45cfdb78 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt @@ -21,6 +21,7 @@ import com.google.gradle.types.ModuleVersion import com.google.gradle.types.VersionType import java.io.File import org.gradle.api.DefaultTask +import org.gradle.api.file.RegularFile import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.ListProperty import org.gradle.api.provider.Property diff --git a/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt b/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt index 183cb788..716eb293 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt @@ -17,9 +17,11 @@ package com.google.gradle.tasks import com.google.gradle.types.ModuleVersion +import com.google.gradle.util.file import com.google.gradle.util.rewriteLines import java.io.File import org.gradle.api.DefaultTask +import org.gradle.api.file.RegularFileProperty import org.gradle.api.provider.Property import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFile @@ -38,7 +40,7 @@ import org.gradle.kotlin.dsl.provideDelegate */ abstract class VersionBumpTask : DefaultTask() { @get:[Optional InputFile] - abstract val versionFile: Property + abstract val versionFile: RegularFileProperty @get:[Optional Input] abstract val newVersion: Property @@ -52,7 +54,7 @@ abstract class VersionBumpTask : DefaultTask() { if (newVersion.get().major > 0) throw RuntimeException("You're trying to bump the major version. This is a no 1.0+ zone!!") - versionFile.get().rewriteLines { + versionFile.get().asFile.rewriteLines { when { it.startsWith("version=") -> "version=${newVersion.get()}" else -> it @@ -61,8 +63,10 @@ abstract class VersionBumpTask : DefaultTask() { } private fun configure() { - versionFile.convention(project.file("gradle.properties")) - newVersion.convention(computeVersionBump()) + with(project) { + versionFile.convention(layout.file("gradle.properties")) + newVersion.convention(computeVersionBump()) + } } private fun computeVersionBump(): ModuleVersion? { diff --git a/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt b/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt index b75693f1..363f04d2 100644 --- a/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt +++ b/plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt @@ -20,9 +20,8 @@ import com.google.gradle.types.LinesChanged import com.google.gradle.types.VersionType.* import com.google.gradle.util.SkipTask import com.google.gradle.util.spoiler -import java.io.File import org.gradle.api.DefaultTask -import org.gradle.api.provider.Property +import org.gradle.api.file.RegularFileProperty import org.gradle.api.tasks.InputFile import org.gradle.api.tasks.OutputFile import org.gradle.api.tasks.TaskAction @@ -42,19 +41,19 @@ import org.gradle.api.tasks.TaskAction * If no public api changes are found, then no message will be generated and the task will skip * itself. * - * @property changesFile a file contained a [LinesChanged]; representing the changes made in this + * @property changesFile a file containing a [LinesChanged]; representing the changes made in this * repo * @property outputFile where to save the warning message to * @throws SkipTask if no public api changes are found */ abstract class WarnAboutApiChangesTask : DefaultTask() { - @get:InputFile abstract val changesFile: Property + @get:InputFile abstract val changesFile: RegularFileProperty - @get:OutputFile abstract val outputFile: Property + @get:OutputFile abstract val outputFile: RegularFileProperty @TaskAction fun add() { - val diff = LinesChanged.fromFile(changesFile.get()) + val diff = LinesChanged.fromFile(changesFile.asFile.get()) val added = spoiler("APIs Added", diff.added.joinToString("\n\n") { it.trim() }) val removed = spoiler("APIs Removed", diff.removed.joinToString("\n\n") { it.trim() }) @@ -83,6 +82,6 @@ abstract class WarnAboutApiChangesTask : DefaultTask() { else -> throw SkipTask("No public api changes found") } - outputFile.get().writeText(message) + outputFile.asFile.get().writeText(message) } } diff --git a/plugins/src/main/java/com/google/gradle/util/gradle.kt b/plugins/src/main/java/com/google/gradle/util/gradle.kt index 68b198b3..ba246f75 100644 --- a/plugins/src/main/java/com/google/gradle/util/gradle.kt +++ b/plugins/src/main/java/com/google/gradle/util/gradle.kt @@ -72,6 +72,11 @@ inline fun , C : WorkParameters> WorkQueue.submit( */ fun Provider.childFile(path: String): Provider = map { File("${it.path}/$path") } +/** Variant of [childFile] that works with [RegularFile]. */ +context(Project) +fun Provider.childFile(path: String): Provider = + project.layout.file(map { it.asFile.childFile(path) }) + /** * Returns a new [File] under the given sub directory. * @@ -89,8 +94,8 @@ fun File.childFile(childPath: String) = File("$path/$childPath") * preferred to defining an explicit [File]. This will allow Gradle to make better optimizations on * our part, and helps us avoid edge-case scenarios like conflicting file names. */ -fun DefaultTask.tempFile(path: String): Provider = - project.provider { temporaryDir.childFile(path) } +fun DefaultTask.tempFile(path: String): Provider = + with(project) { layout.file("$temporaryDir/$path") } /** * Syntax sugar for: @@ -118,6 +123,11 @@ typealias SkipTask = StopActionException val TaskProvider<*>.outputFile: Provider get() = map { it.outputs.files.allChildren().first { !it.isDirectory } } +/** Variant of [outputFile] that provides the output as a [RegularFile] */ +context(Project) +val TaskProvider<*>.regularOutputFile: Provider + get() = layout.file(outputFile) + /** * Generates a sequence of [File]s under this collection. * @@ -216,7 +226,8 @@ val Project.moduleVersion: ModuleVersion ModuleVersion.fromStringOrNull(project.version.toString()) ?: throw RuntimeException("Invalid project version found.") -/** Maps a file provider to an alternative provider if the original file does not exist. */ -fun Provider.orElseIfNotExists(file: Provider): Provider = map { - it.takeIf { it.exists() } ?: file.get() -} +/** Maps a [RegularFile] provider to an alternative provider if the original file does not exist. */ +fun Provider.orElseIfNotExists(file: Provider): Provider = + map { + it.takeIf { it.asFile.exists() } ?: file.get() + } From a081fb32f91ed0e79f7052c96f28625ef95153be Mon Sep 17 00:00:00 2001 From: Daymon <17409137+daymxn@users.noreply.github.com> Date: Thu, 25 Apr 2024 12:55:09 -0500 Subject: [PATCH 31/41] Remove usages of Beta flag (#127) Per [b/337045627](https://b.corp.google.com/issues/337045627), Since `v1beta` is now the default, we no longer have any need to require optin for certain features. The annotation itself has been left for future usage, but its actual usages have been removed. --- .changes/generativeai/cork-dock-apple-cobweb.json | 1 + .../google/ai/client/generativeai/GenerativeModel.kt | 3 --- .../client/generativeai/internal/util/conversions.kt | 4 ---- .../client/generativeai/type/FunctionCallingConfig.kt | 1 - .../client/generativeai/type/FunctionDeclarations.kt | 11 ----------- .../com/google/ai/client/generativeai/type/Tool.kt | 1 - .../google/ai/client/generativeai/type/ToolConfig.kt | 1 - 7 files changed, 1 insertion(+), 21 deletions(-) create mode 100644 .changes/generativeai/cork-dock-apple-cobweb.json diff --git a/.changes/generativeai/cork-dock-apple-cobweb.json b/.changes/generativeai/cork-dock-apple-cobweb.json new file mode 100644 index 00000000..a7600fd1 --- /dev/null +++ b/.changes/generativeai/cork-dock-apple-cobweb.json @@ -0,0 +1 @@ +{"type":"PATCH","changes":["Remove usages of v1beta opt-in flag"]} diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt index 09044103..6a4618a9 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/GenerativeModel.kt @@ -29,7 +29,6 @@ import com.google.ai.client.generativeai.type.FourParameterFunction import com.google.ai.client.generativeai.type.FunctionCallPart import com.google.ai.client.generativeai.type.GenerateContentResponse import com.google.ai.client.generativeai.type.GenerationConfig -import com.google.ai.client.generativeai.type.GenerativeBeta import com.google.ai.client.generativeai.type.GoogleGenerativeAIException import com.google.ai.client.generativeai.type.InvalidStateException import com.google.ai.client.generativeai.type.NoParameterFunction @@ -206,7 +205,6 @@ internal constructor( * parameters * @return The output of the requested function call */ - @OptIn(GenerativeBeta::class) suspend fun executeFunction(functionCallPart: FunctionCallPart): JSONObject { if (tools == null) { throw InvalidStateException("No registered tools") @@ -230,7 +228,6 @@ internal constructor( } } - @OptIn(GenerativeBeta::class) private fun constructRequest(vararg prompt: Content) = GenerateContentRequest( modelName, diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt index 813b03f6..e1bed93b 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt @@ -49,7 +49,6 @@ import com.google.ai.client.generativeai.type.BlockThreshold import com.google.ai.client.generativeai.type.CitationMetadata import com.google.ai.client.generativeai.type.FunctionCallingConfig import com.google.ai.client.generativeai.type.FunctionDeclaration -import com.google.ai.client.generativeai.type.GenerativeBeta import com.google.ai.client.generativeai.type.ImagePart import com.google.ai.client.generativeai.type.SerializationException import com.google.ai.client.generativeai.type.Tool @@ -120,11 +119,9 @@ internal fun BlockThreshold.toInternal() = BlockThreshold.UNSPECIFIED -> HarmBlockThreshold.UNSPECIFIED } -@GenerativeBeta internal fun Tool.toInternal() = com.google.ai.client.generativeai.common.client.Tool(functionDeclarations.map { it.toInternal() }) -@GenerativeBeta internal fun ToolConfig.toInternal() = com.google.ai.client.generativeai.common.client.ToolConfig( com.google.ai.client.generativeai.common.client.FunctionCallingConfig( @@ -139,7 +136,6 @@ internal fun ToolConfig.toInternal() = ) ) -@GenerativeBeta internal fun FunctionDeclaration.toInternal() = com.google.ai.client.generativeai.common.client.FunctionDeclaration( name, diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt index a2da761c..536f7fc7 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionCallingConfig.kt @@ -22,7 +22,6 @@ package com.google.ai.client.generativeai.type * * @param mode The function calling mode of the model */ -@GenerativeBeta class FunctionCallingConfig(val mode: Mode) { enum class Mode { /** diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt index 0382a411..7c65fbac 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionDeclarations.kt @@ -26,7 +26,6 @@ import org.json.JSONObject * @property description A description of what the function does and its output. * @property function the function implementation */ -@GenerativeBeta class NoParameterFunction( name: String, description: String, @@ -48,7 +47,6 @@ class NoParameterFunction( * @property param A description of the first function parameter * @property function the function implementation */ -@GenerativeBeta class OneParameterFunction( name: String, description: String, @@ -73,7 +71,6 @@ class OneParameterFunction( * @property param2 A description of the second function parameter * @property function the function implementation */ -@GenerativeBeta class TwoParameterFunction( name: String, description: String, @@ -101,7 +98,6 @@ class TwoParameterFunction( * @property param3 A description of the third function parameter * @property function the function implementation */ -@GenerativeBeta class ThreeParameterFunction( name: String, description: String, @@ -132,7 +128,6 @@ class ThreeParameterFunction( * @property param4 A description of the fourth function parameter * @property function the function implementation */ -@GenerativeBeta class FourParameterFunction( name: String, description: String, @@ -153,7 +148,6 @@ class FourParameterFunction( } } -@GenerativeBeta abstract class FunctionDeclaration(val name: String, val description: String) { abstract fun getParameters(): List> @@ -226,11 +220,9 @@ class Schema( } } -@GenerativeBeta fun defineFunction(name: String, description: String, function: suspend () -> JSONObject) = NoParameterFunction(name, description, function) -@GenerativeBeta fun defineFunction( name: String, description: String, @@ -238,7 +230,6 @@ fun defineFunction( function: suspend (T) -> JSONObject, ) = OneParameterFunction(name, description, arg1, function) -@GenerativeBeta fun defineFunction( name: String, description: String, @@ -247,7 +238,6 @@ fun defineFunction( function: suspend (T, U) -> JSONObject, ) = TwoParameterFunction(name, description, arg1, arg2, function) -@GenerativeBeta fun defineFunction( name: String, description: String, @@ -257,7 +247,6 @@ fun defineFunction( function: suspend (T, U, W) -> JSONObject, ) = ThreeParameterFunction(name, description, arg1, arg2, arg3, function) -@GenerativeBeta fun defineFunction( name: String, description: String, diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt index 67467710..29cef4ec 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/Tool.kt @@ -22,7 +22,6 @@ package com.google.ai.client.generativeai.type * * @param functionDeclarations The set of functions that this tool allows the model access to */ -@OptIn(GenerativeBeta::class) class Tool( val functionDeclarations: List, ) diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt index cc392320..078449e6 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/ToolConfig.kt @@ -22,7 +22,6 @@ package com.google.ai.client.generativeai.type * * @param functionCallingConfig The config for function calling */ -@OptIn(GenerativeBeta::class) class ToolConfig(val functionCallingConfig: FunctionCallingConfig) { companion object { From 146c4d6dc66b49bf508a257945bdc4f7c234bd47 Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Fri, 3 May 2024 11:17:07 -0400 Subject: [PATCH 32/41] Correctly handle UsageMetadata (#135) Also, exposes the data when available. Addresses issue #134 --- .../ai/client/generativeai/common/Response.kt | 6 +- .../generativeai/common/UnarySnapshotTests.kt | 14 +++++ .../unary/success-partial-usage-metadata.json | 57 +++++++++++++++++++ .../generativeai/internal/util/conversions.kt | 5 ++ .../type/GenerateContentResponse.kt | 1 + .../client/generativeai/type/UsageMetadata.kt | 30 ++++++++++ .../generativeai/GenerativeModelTests.kt | 8 ++- 7 files changed, 116 insertions(+), 5 deletions(-) create mode 100644 common/src/test/resources/golden-files/unary/success-partial-usage-metadata.json create mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/UsageMetadata.kt diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt index ac7cec57..e3885bfd 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt +++ b/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt @@ -38,7 +38,7 @@ data class CountTokensResponse(val totalTokens: Int, val totalBillableCharacters @Serializable data class UsageMetadata( - val promptTokenCount: Int, - val candidatesTokenCount: Int?, - val totalTokenCount: Int + val promptTokenCount: Int? = null, + val candidatesTokenCount: Int? = null, + val totalTokenCount: Int? = null ) diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt index f90646c2..cea9d0a8 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt +++ b/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt @@ -184,6 +184,20 @@ internal class UnarySnapshotTests { } } + @Test + fun `response includes partial usage metadata`() = + goldenUnaryFile("success-partial-usage-metadata.json") { + withTimeout(testTimeout) { + val response = apiController.generateContent(textGenerateContentRequest("prompt")) + + response.candidates?.isEmpty() shouldBe false + response.candidates?.first()?.finishReason shouldBe FinishReason.STOP + response.usageMetadata shouldNotBe null + response.usageMetadata?.promptTokenCount shouldBe 6 + response.usageMetadata?.totalTokenCount shouldBe null + } + } + @Test fun `citation returns correctly when using alternative name`() = goldenUnaryFile("success-citations-altname.json") { diff --git a/common/src/test/resources/golden-files/unary/success-partial-usage-metadata.json b/common/src/test/resources/golden-files/unary/success-partial-usage-metadata.json new file mode 100644 index 00000000..662b873f --- /dev/null +++ b/common/src/test/resources/golden-files/unary/success-partial-usage-metadata.json @@ -0,0 +1,57 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Mountain View, California, United States" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0, + "safetyRatings": [ + { + "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HATE_SPEECH", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_DANGEROUS_CONTENT", + "probability": "NEGLIGIBLE" + } + ] + } + ], + "usageMetadata": { + "promptTokenCount": 6 + }, + "promptFeedback": { + "safetyRatings": [ + { + "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HATE_SPEECH", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_HARASSMENT", + "probability": "NEGLIGIBLE" + }, + { + "category": "HARM_CATEGORY_DANGEROUS_CONTENT", + "probability": "NEGLIGIBLE" + } + ] + } +} diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt index e1bed93b..27cf747c 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt @@ -53,6 +53,7 @@ import com.google.ai.client.generativeai.type.ImagePart import com.google.ai.client.generativeai.type.SerializationException import com.google.ai.client.generativeai.type.Tool import com.google.ai.client.generativeai.type.ToolConfig +import com.google.ai.client.generativeai.type.UsageMetadata import com.google.ai.client.generativeai.type.content import java.io.ByteArrayOutputStream import kotlinx.serialization.json.Json @@ -136,6 +137,9 @@ internal fun ToolConfig.toInternal() = ) ) +internal fun com.google.ai.client.generativeai.common.UsageMetadata.toPublic(): UsageMetadata = + UsageMetadata(promptTokenCount ?: 0, candidatesTokenCount ?: 0, totalTokenCount ?: 0) + internal fun FunctionDeclaration.toInternal() = com.google.ai.client.generativeai.common.client.FunctionDeclaration( name, @@ -269,6 +273,7 @@ internal fun GenerateContentResponse.toPublic() = com.google.ai.client.generativeai.type.GenerateContentResponse( candidates?.map { it.toPublic() }.orEmpty(), promptFeedback?.toPublic(), + usageMetadata?.toPublic() ) internal fun CountTokensResponse.toPublic() = diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt index 9fe30329..76b4a1bf 100644 --- a/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/GenerateContentResponse.kt @@ -28,6 +28,7 @@ import android.util.Log class GenerateContentResponse( val candidates: List, val promptFeedback: PromptFeedback?, + val usageMetadata: UsageMetadata? ) { /** Convenience field representing the first text part in the response, if it exists. */ val text: String? by lazy { firstPartAs()?.text } diff --git a/generativeai/src/main/java/com/google/ai/client/generativeai/type/UsageMetadata.kt b/generativeai/src/main/java/com/google/ai/client/generativeai/type/UsageMetadata.kt new file mode 100644 index 00000000..ba1649e2 --- /dev/null +++ b/generativeai/src/main/java/com/google/ai/client/generativeai/type/UsageMetadata.kt @@ -0,0 +1,30 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.ai.client.generativeai.type + +/** + * Usage metadata about response(s). + * + * @param promptTokenCount Number of tokens in the request. + * @param candidatesTokenCount Number of tokens in the response(s). + * @param totalTokenCount Total number of tokens. + */ +class UsageMetadata( + val promptTokenCount: Int, + val candidatesTokenCount: Int, + val totalTokenCount: Int +) diff --git a/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt b/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt index 917c72cd..286b4fd1 100644 --- a/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt +++ b/generativeai/src/test/java/com/google/ai/client/generativeai/GenerativeModelTests.kt @@ -21,6 +21,7 @@ import com.google.ai.client.generativeai.common.GenerateContentRequest as Genera import com.google.ai.client.generativeai.common.GenerateContentResponse as GenerateContentResponse_Common import com.google.ai.client.generativeai.common.InvalidAPIKeyException as InvalidAPIKeyException_Common import com.google.ai.client.generativeai.common.UnsupportedUserLocationException as UnsupportedUserLocationException_Common +import com.google.ai.client.generativeai.common.UsageMetadata as UsageMetadata_Common import com.google.ai.client.generativeai.common.server.Candidate as Candidate_Common import com.google.ai.client.generativeai.common.server.CitationMetadata as CitationMetadata_Common import com.google.ai.client.generativeai.common.server.CitationSources @@ -34,6 +35,7 @@ import com.google.ai.client.generativeai.type.InvalidAPIKeyException import com.google.ai.client.generativeai.type.PromptFeedback import com.google.ai.client.generativeai.type.TextPart import com.google.ai.client.generativeai.type.UnsupportedUserLocationException +import com.google.ai.client.generativeai.type.UsageMetadata import io.kotest.assertions.throwables.shouldThrow import io.kotest.matchers.collections.shouldHaveSize import io.kotest.matchers.equality.shouldBeEqualToUsingFields @@ -79,7 +81,8 @@ internal class GenerativeModelTests { ) ) ) - ) + ), + usageMetadata = UsageMetadata_Common(promptTokenCount = 10) ) val expectedResponse = @@ -100,7 +103,8 @@ internal class GenerativeModelTests { finishReason = null ) ), - PromptFeedback(null, listOf()) + PromptFeedback(null, listOf()), + UsageMetadata(10, 0, 0 /* default to 0*/) ) val response = model.generateContent("Why's the sky blue?") From 1d12b8120c03ddd3e5c40e98f5c856182e37107a Mon Sep 17 00:00:00 2001 From: Rodrigo Lazo Date: Fri, 3 May 2024 11:37:27 -0400 Subject: [PATCH 33/41] Bump release to 0.5.0 (genai) 0.4.0 (common) (#136) --- api/common/0.4.0.api | 1225 ++++++++++++++++++++++++++++++++ api/generativeai/0.5.0.api | 504 +++++++++++++ common/gradle.properties | 2 +- generativeai/gradle.properties | 2 +- 4 files changed, 1731 insertions(+), 2 deletions(-) create mode 100644 api/common/0.4.0.api create mode 100644 api/generativeai/0.5.0.api diff --git a/api/common/0.4.0.api b/api/common/0.4.0.api new file mode 100644 index 00000000..ad749907 --- /dev/null +++ b/api/common/0.4.0.api @@ -0,0 +1,1225 @@ +public final class com/google/ai/client/generativeai/common/APIController { + public static final field Companion Lcom/google/ai/client/generativeai/common/APIController$Companion; + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; +} + +public final class com/google/ai/client/generativeai/common/APIController$Companion { +} + +public final class com/google/ai/client/generativeai/common/APIControllerKt { + public static final fun getJSON ()Lkotlinx/serialization/json/Json; +} + +public final class com/google/ai/client/generativeai/common/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getModel ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; + public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/Integer;)V + public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/Integer; + public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getTotalBillableCharacters ()Ljava/lang/Integer; + public final fun getTotalTokens ()I + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; + public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun component5 ()Ljava/util/List; + public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun component7 ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public fun equals (Ljava/lang/Object;)Z + public final fun getContents ()Ljava/util/List; + public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public final fun getModel ()Ljava/lang/String; + public final fun getSafetySettings ()Ljava/util/List; + public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public final fun getTools ()Ljava/util/List; + public fun hashCode ()I + public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { + public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; + public fun ()V + public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/util/List; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidates ()Ljava/util/List; + public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { + public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { + public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; +} + +public abstract interface class com/google/ai/client/generativeai/common/HeaderProvider { + public abstract fun generateHeaders (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public abstract fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Request { +} + +public final class com/google/ai/client/generativeai/common/RequestOptions { + public fun ()V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;)V + public fun (Ljava/lang/Long;Ljava/lang/String;)V + public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getApiVersion ()Ljava/lang/String; + public final fun getEndpoint ()Ljava/lang/String; + public final fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/Response { +} + +public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { + public fun ()V + public fun (Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; + public fun ()V + public synthetic fun (ILjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V + public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/Integer; + public final fun component2 ()Ljava/lang/Integer; + public final fun component3 ()Ljava/lang/Integer; + public final fun copy (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidatesTokenCount ()Ljava/lang/Integer; + public final fun getPromptTokenCount ()Ljava/lang/Integer; + public final fun getTotalTokenCount ()Ljava/lang/Integer; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { + public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; + public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; + public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; + public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V + public final fun component1 ()Ljava/lang/Float; + public final fun component2 ()Ljava/lang/Float; + public final fun component3 ()Ljava/lang/Integer; + public final fun component4 ()Ljava/lang/Integer; + public final fun component5 ()Ljava/lang/Integer; + public final fun component6 ()Ljava/util/List; + public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getCandidateCount ()Ljava/lang/Integer; + public final fun getMaxOutputTokens ()Ljava/lang/Integer; + public final fun getStopSequences ()Ljava/util/List; + public final fun getTemperature ()Ljava/lang/Float; + public final fun getTopK ()Ljava/lang/Integer; + public final fun getTopP ()Ljava/lang/Float; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/util/List; + public final fun component5 ()Ljava/util/Map; + public final fun component6 ()Ljava/util/List; + public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; + public fun equals (Ljava/lang/Object;)Z + public final fun getDescription ()Ljava/lang/String; + public final fun getEnum ()Ljava/util/List; + public final fun getFormat ()Ljava/lang/String; + public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; + public final fun getProperties ()Ljava/util/Map; + public final fun getRequired ()Ljava/util/List; + public final fun getType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Schema$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionDeclarations ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/Tool$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig { + public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun component3 ()Ljava/util/List; + public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; + public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; + public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun component1 ()Ljava/util/List; + public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public fun equals (Ljava/lang/Object;)Z + public final fun getCitationSources ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; + public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (IILjava/lang/String;Ljava/lang/String;)V + public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()I + public final fun component2 ()I + public final fun component3 ()Ljava/lang/String; + public final fun component4 ()Ljava/lang/String; + public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public fun equals (Ljava/lang/Object;)Z + public final fun getEndIndex ()I + public final fun getLicense ()Ljava/lang/String; + public final fun getStartIndex ()I + public final fun getUri ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; + public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; + public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (ILjava/lang/String;)V + public final fun component1 ()I + public final fun component2 ()Ljava/lang/String; + public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public fun equals (Ljava/lang/Object;)Z + public final fun getCode ()I + public final fun getMessage ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; + public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/server/HarmSeverity : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmSeverity$Companion; + public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmSeverity; +} + +public final class com/google/ai/client/generativeai/common/server/HarmSeverity$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; + public fun ()V + public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun component2 ()Ljava/util/List; + public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; + public final fun getSafetyRatings ()Ljava/util/List; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating { + public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)V + public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public final fun component3 ()Ljava/lang/Boolean; + public final fun component4 ()Ljava/lang/Float; + public final fun component5 ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public final fun component6 ()Ljava/lang/Float; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public fun equals (Ljava/lang/Object;)Z + public final fun getBlocked ()Ljava/lang/Boolean; + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; + public final fun getProbabilityScore ()Ljava/lang/Float; + public final fun getSeverity ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; + public final fun getSeverityScore ()Ljava/lang/Float; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun equals (Ljava/lang/Object;)Z + public final fun getData ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/List; + public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; + public fun equals (Ljava/lang/Object;)Z + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/Content$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; + public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileUri ()Ljava/lang/String; + public final fun getMimeType ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; + public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Ljava/util/Map;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Ljava/util/Map; + public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun equals (Ljava/lang/Object;)Z + public final fun getArgs ()Ljava/util/Map; + public final fun getName ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V + public final fun component1 ()Ljava/lang/String; + public final fun component2 ()Lkotlinx/serialization/json/JsonObject; + public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun equals (Ljava/lang/Object;)Z + public final fun getName ()Ljava/lang/String; + public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public fun equals (Ljava/lang/Object;)Z + public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { + public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; + public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public abstract interface class com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; +} + +public final class com/google/ai/client/generativeai/common/shared/Part$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; + public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V + public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public fun equals (Ljava/lang/Object;)Z + public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; + public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { + public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; + public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V + public fun (Ljava/lang/String;)V + public final fun component1 ()Ljava/lang/String; + public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public fun equals (Ljava/lang/Object;)Z + public final fun getText ()Ljava/lang/String; + public fun hashCode ()I + public fun toString ()Ljava/lang/String; + public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { + public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; + public fun childSerializers ()[Lkotlinx/serialization/KSerializer; + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V + public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { + public final fun serializer ()Lkotlinx/serialization/KSerializer; +} + +public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { + public fun (Lkotlin/reflect/KClass;)V + public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; + public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; + public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; + public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V + public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V +} + +public final class com/google/ai/client/generativeai/common/util/SerializationKt { + public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; + public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; +} + diff --git a/api/generativeai/0.5.0.api b/api/generativeai/0.5.0.api new file mode 100644 index 00000000..7b3362ef --- /dev/null +++ b/api/generativeai/0.5.0.api @@ -0,0 +1,504 @@ +public final class com/google/ai/client/generativeai/BuildConfig { + public static final field BUILD_TYPE Ljava/lang/String; + public static final field DEBUG Z + public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; + public static final field VERSION_NAME Ljava/lang/String; + public fun ()V +} + +public final class com/google/ai/client/generativeai/Chat { + public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V + public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getHistory ()Ljava/util/List; + public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; + public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; + public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; +} + +public final class com/google/ai/client/generativeai/GenerativeModel { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;)V + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun executeFunction (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; + public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; + public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; + public final fun getApiKey ()Ljava/lang/String; + public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; + public final fun getModelName ()Ljava/lang/String; + public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; + public final fun getSafetySettings ()Ljava/util/List; + public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getToolConfig ()Lcom/google/ai/client/generativeai/type/ToolConfig; + public final fun getTools ()Ljava/util/List; + public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; + public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; +} + +public abstract class com/google/ai/client/generativeai/java/ChatFutures { + public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; + public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; + public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; + public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; +} + +public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { + public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; +} + +public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { + public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; + public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; + public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; + public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; + public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; + public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; + public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; +} + +public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { + public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; +} + +public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;[B)V + public final fun getBlob ()[B + public final fun getMimeType ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { + public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; + public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; +} + +public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { + public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; + public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; +} + +public final class com/google/ai/client/generativeai/type/Candidate { + public final fun getCitationMetadata ()Ljava/util/List; + public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; + public final fun getSafetyRatings ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/CitationMetadata { + public fun (IILjava/lang/String;Ljava/lang/String;)V + public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getEndIndex ()I + public final fun getLicense ()Ljava/lang/String; + public final fun getStartIndex ()I + public final fun getUri ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/Content { + public fun (Ljava/lang/String;Ljava/util/List;)V + public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/util/List;)V + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/Content$Builder { + public fun ()V + public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addFileData (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; + public final fun build ()Lcom/google/ai/client/generativeai/type/Content; + public final fun getParts ()Ljava/util/List; + public final fun getRole ()Ljava/lang/String; + public final fun setParts (Ljava/util/List;)V + public final fun setRole (Ljava/lang/String;)V +} + +public final class com/google/ai/client/generativeai/type/ContentKt { + public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; + public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; +} + +public final class com/google/ai/client/generativeai/type/CountTokensResponse { + public fun (I)V + public final fun component1 ()I + public final fun getTotalTokens ()I +} + +public final class com/google/ai/client/generativeai/type/FileDataPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public final fun getMimeType ()Ljava/lang/String; + public final fun getUri ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { + public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; + public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; +} + +public final class com/google/ai/client/generativeai/type/FourParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function5; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam4 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Ljava/util/Map;)V + public final fun getArgs ()Ljava/util/Map; + public final fun getName ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallingConfig { + public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode;)V + public final fun getMode ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; +} + +public final class com/google/ai/client/generativeai/type/FunctionCallingConfig$Mode : java/lang/Enum { + public static final field ANY Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static final field AUTO Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static final field NONE Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; + public static fun values ()[Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; +} + +public abstract class com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;)V + public abstract fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public abstract fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/FunctionDeclarationsKt { + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)Lcom/google/ai/client/generativeai/type/FourParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)Lcom/google/ai/client/generativeai/type/ThreeParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)Lcom/google/ai/client/generativeai/type/TwoParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)Lcom/google/ai/client/generativeai/type/OneParameterFunction; + public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/NoParameterFunction; +} + +public final class com/google/ai/client/generativeai/type/FunctionParameter { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/FunctionType;)V + public final fun getDescription ()Ljava/lang/String; + public final fun getName ()Ljava/lang/String; + public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/FunctionResponsePart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;Lorg/json/JSONObject;)V + public final fun getName ()Ljava/lang/String; + public final fun getResponse ()Lorg/json/JSONObject; +} + +public final class com/google/ai/client/generativeai/type/FunctionType { + public static final field Companion Lcom/google/ai/client/generativeai/type/FunctionType$Companion; + public fun (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public final fun getName ()Ljava/lang/String; + public final fun getParse ()Lkotlin/jvm/functions/Function1; +} + +public final class com/google/ai/client/generativeai/type/FunctionType$Companion { + public final fun getARRAY ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getBOOLEAN ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getINTEGER ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getNUMBER ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getOBJECT ()Lcom/google/ai/client/generativeai/type/FunctionType; + public final fun getSTRING ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/GenerateContentResponse { + public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;Lcom/google/ai/client/generativeai/type/UsageMetadata;)V + public final fun getCandidates ()Ljava/util/List; + public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/type/FunctionCallPart; + public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/type/FunctionResponsePart; + public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; + public final fun getText ()Ljava/lang/String; + public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/type/UsageMetadata; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig { + public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; + public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getCandidateCount ()Ljava/lang/Integer; + public final fun getMaxOutputTokens ()Ljava/lang/Integer; + public final fun getStopSequences ()Ljava/util/List; + public final fun getTemperature ()Ljava/lang/Float; + public final fun getTopK ()Ljava/lang/Integer; + public final fun getTopP ()Ljava/lang/Float; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { + public field candidateCount Ljava/lang/Integer; + public field maxOutputTokens Ljava/lang/Integer; + public field stopSequences Ljava/util/List; + public field temperature Ljava/lang/Float; + public field topK Ljava/lang/Integer; + public field topP Ljava/lang/Float; + public fun ()V + public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { + public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; +} + +public final class com/google/ai/client/generativeai/type/GenerationConfigKt { + public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; +} + +public abstract interface annotation class com/google/ai/client/generativeai/type/GenerativeBeta : java/lang/annotation/Annotation { +} + +public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { + public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { + public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; +} + +public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { + public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; + public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; +} + +public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { + public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; + public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; + public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; + public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; +} + +public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { + public fun (Landroid/graphics/Bitmap;)V + public final fun getImage ()Landroid/graphics/Bitmap; +} + +public final class com/google/ai/client/generativeai/type/InvalidAPIKeyException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/NoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun execute (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function1; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/OneParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function2; + public final fun getParam ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public abstract interface class com/google/ai/client/generativeai/type/Part { +} + +public final class com/google/ai/client/generativeai/type/PartKt { + public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; + public static final fun asFileDataPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/FileDataPart; + public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; + public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/type/PromptFeedback { + public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V + public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; + public final fun getSafetyRatings ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/QuotaExceededException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/RequestOptions { + public fun ()V + public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V + public fun (Ljava/lang/Long;)V + public fun (Ljava/lang/Long;Ljava/lang/String;)V + public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getApiVersion ()Ljava/lang/String; + public final fun getTimeout-UwyO8pc ()J +} + +public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V + public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; +} + +public final class com/google/ai/client/generativeai/type/SafetyRating { + public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V + public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; + public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; +} + +public final class com/google/ai/client/generativeai/type/SafetySetting { + public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V + public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; + public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; +} + +public final class com/google/ai/client/generativeai/type/Schema { + public static final field Companion Lcom/google/ai/client/generativeai/type/Schema$Companion; + public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public final fun fromString (Ljava/lang/String;)Ljava/lang/Object; + public final fun getDescription ()Ljava/lang/String; + public final fun getEnum ()Ljava/util/List; + public final fun getFormat ()Ljava/lang/String; + public final fun getItems ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getName ()Ljava/lang/String; + public final fun getProperties ()Ljava/util/Map; + public final fun getRequired ()Ljava/util/List; + public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; +} + +public final class com/google/ai/client/generativeai/type/Schema$Companion { + public final fun arr (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun bool (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun enum (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun int (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun num (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun obj (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; + public final fun str (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; +} + +public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { + public fun (Ljava/lang/String;)V + public final fun getText ()Ljava/lang/String; +} + +public final class com/google/ai/client/generativeai/type/ThreeParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function4; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/Tool { + public fun (Ljava/util/List;)V + public final fun getFunctionDeclarations ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/ToolConfig { + public static final field Companion Lcom/google/ai/client/generativeai/type/ToolConfig$Companion; + public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig;)V + public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig; +} + +public final class com/google/ai/client/generativeai/type/ToolConfig$Companion { + public final fun always ()Lcom/google/ai/client/generativeai/type/ToolConfig; + public final fun never ()Lcom/google/ai/client/generativeai/type/ToolConfig; +} + +public final class com/google/ai/client/generativeai/type/TwoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { + public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)V + public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; + public final fun getFunction ()Lkotlin/jvm/functions/Function3; + public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; + public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; + public fun getParameters ()Ljava/util/List; +} + +public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun (Ljava/lang/String;Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/UnsupportedUserLocationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { + public fun ()V + public fun (Ljava/lang/Throwable;)V + public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V +} + +public final class com/google/ai/client/generativeai/type/UsageMetadata { + public fun (III)V + public final fun getCandidatesTokenCount ()I + public final fun getPromptTokenCount ()I + public final fun getTotalTokenCount ()I +} + diff --git a/common/gradle.properties b/common/gradle.properties index 62044170..b31ef9ad 100644 --- a/common/gradle.properties +++ b/common/gradle.properties @@ -1 +1 @@ -version=0.3.0 +version=0.4.0 diff --git a/generativeai/gradle.properties b/generativeai/gradle.properties index b31ef9ad..59a78457 100644 --- a/generativeai/gradle.properties +++ b/generativeai/gradle.properties @@ -1 +1 @@ -version=0.4.0 +version=0.5.0 From d9531c49960dd769862e1e4072bdfb7a6550adc6 Mon Sep 17 00:00:00 2001 From: Shreyas Patil Date: Sat, 4 May 2024 14:21:40 +0530 Subject: [PATCH 34/41] Sync with v0.5.0 --- .github/workflows/build_release.yml | 77 +- CONTRIBUTING.md | 22 +- README.md | 93 +- api/common/0.1.0.api | 1188 ---------------- api/common/0.2.0.api | 1223 ---------------- api/common/0.3.0.api | 1223 ---------------- api/common/0.4.0.api | 1225 ----------------- api/generativeai/0.1.0.api | 284 ---- api/generativeai/0.1.1.api | 292 ---- api/generativeai/0.1.2.api | 289 ---- api/generativeai/0.2.0.api | 317 ----- api/generativeai/0.2.2.api | 319 ----- api/generativeai/0.3.0.api | 496 ------- api/generativeai/0.4.0.api | 496 ------- api/generativeai/0.5.0.api | 504 ------- build.gradle.kts | 40 +- common/build.gradle.kts | 128 +- common/gradle.properties | 3 +- .../ai/client/generativeai/common/util/Log.kt | 10 + .../{main => commonMain}/AndroidManifest.xml | 0 .../generativeai/common/APIController.kt | 26 +- .../client/generativeai/common/Exceptions.kt | 2 +- .../ai/client/generativeai/common/Request.kt | 12 +- .../generativeai/common/RequestOptions.kt | 3 +- .../ai/client/generativeai/common/Response.kt | 8 +- .../generativeai/common/client/Types.kt | 21 +- .../generativeai/common/server/Types.kt | 55 +- .../generativeai/common/shared/Types.kt | 112 ++ .../ai/client/generativeai/common/util/Log.kt | 6 + .../client/generativeai/common/util/kotlin.kt | 24 +- .../client/generativeai/common/util/ktor.kt | 2 +- .../generativeai/common/util/serialization.kt | 86 ++ .../ai/client/generativeai/common/util/Log.kt | 11 + .../ai/client/generativeai/common/util/Log.kt | 11 + .../ai/client/generativeai/common/util/Log.kt | 15 + .../generativeai/common/shared/Types.kt | 102 -- .../generativeai/common/util/serialization.kt | 83 -- .../generativeai/common/APIControllerTests.kt | 22 +- .../common/StreamingSnapshotTests.kt | 12 +- .../generativeai/common/UnarySnapshotTests.kt | 16 +- .../client/generativeai/common/util/kotlin.kt | 2 +- .../client/generativeai/common/util/tests.kt | 20 +- .../.google/packaging.yaml | 33 - generativeai-android-sample/README.md | 34 - .../app/build.gradle.kts | 79 -- .../app/src/main/AndroidManifest.xml | 40 - .../ai/sample/GenerativeAiViewModelFactory.kt | 76 - .../com/google/ai/sample/MainActivity.kt | 68 - .../kotlin/com/google/ai/sample/MenuScreen.kt | 92 -- .../ai/sample/feature/chat/ChatMessage.kt | 30 - .../ai/sample/feature/chat/ChatScreen.kt | 222 --- .../ai/sample/feature/chat/ChatUiState.kt | 39 - .../ai/sample/feature/chat/ChatViewModel.kt | 88 -- .../multimodal/PhotoReasoningScreen.kt | 265 ---- .../multimodal/PhotoReasoningUiState.kt | 47 - .../multimodal/PhotoReasoningViewModel.kt | 67 - .../ai/sample/feature/text/SummarizeScreen.kt | 186 --- .../sample/feature/text/SummarizeUiState.kt | 47 - .../sample/feature/text/SummarizeViewModel.kt | 72 - .../com/google/ai/sample/ui/theme/Color.kt | 27 - .../com/google/ai/sample/ui/theme/Theme.kt | 51 - .../com/google/ai/sample/ui/theme/Type.kt | 34 - .../com/google/ai/sample/util/UriSaver.kt | 32 - .../res/drawable/ic_launcher_background.xml | 184 --- .../res/drawable/ic_launcher_foreground.xml | 44 - .../main/res/mipmap-anydpi/ic_launcher.xml | 20 - .../res/mipmap-anydpi/ic_launcher_round.xml | 20 - .../src/main/res/mipmap-hdpi/ic_launcher.webp | Bin 1404 -> 0 bytes .../res/mipmap-hdpi/ic_launcher_round.webp | Bin 2898 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.webp | Bin 982 -> 0 bytes .../res/mipmap-mdpi/ic_launcher_round.webp | Bin 1772 -> 0 bytes .../main/res/mipmap-xhdpi/ic_launcher.webp | Bin 1900 -> 0 bytes .../res/mipmap-xhdpi/ic_launcher_round.webp | Bin 3918 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.webp | Bin 2884 -> 0 bytes .../res/mipmap-xxhdpi/ic_launcher_round.webp | Bin 5914 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.webp | Bin 3844 -> 0 bytes .../res/mipmap-xxxhdpi/ic_launcher_round.webp | Bin 7778 -> 0 bytes .../app/src/main/res/values/colors.xml | 24 - .../app/src/main/res/values/strings.xml | 40 - .../app/src/main/res/values/themes.xml | 19 - .../app/src/main/res/xml/backup_rules.xml | 28 - .../main/res/xml/data_extraction_rules.xml | 34 - generativeai-android-sample/build.gradle.kts | 26 - generativeai-android-sample/gradle.properties | 15 - .../gradle/wrapper/gradle-wrapper.jar | Bin 60756 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 - generativeai-android-sample/gradlew | 240 ---- generativeai-android-sample/gradlew.bat | 91 -- .../screenshots/screenshots.png | Bin 501551 -> 0 bytes .../settings.gradle.kts | 35 - generativeai/build.gradle.kts | 110 +- generativeai/consumer-rules.pro | 2 +- generativeai/gradle.properties | 3 +- .../{main => androidMain}/AndroidManifest.xml | 0 .../type/PlatformImage.android.kt | 38 + .../generativeai/ExampleInstrumentedTest.kt | 38 - .../ai/client/generativeai/Chat.kt | 27 +- .../ai/client/generativeai/GenerativeModel.kt | 69 +- .../generativeai/internal/util/conversions.kt | 294 ++++ .../generativeai/type/BlockThreshold.kt | 2 +- .../ai/client/generativeai/type/Candidate.kt | 2 +- .../ai/client/generativeai/type/Content.kt | 6 +- .../generativeai/type/CountTokensResponse.kt | 2 +- .../ai/client/generativeai/type/Exceptions.kt | 28 +- .../type/FunctionCallingConfig.kt | 2 +- .../generativeai/type/FunctionDeclarations.kt | 36 +- .../type/GenerateContentResponse.kt | 4 +- .../generativeai/type/GenerationConfig.kt | 4 +- .../generativeai/type/GenerativeBeta.kt | 2 +- .../client/generativeai/type/HarmCategory.kt | 2 +- .../generativeai/type/HarmProbability.kt | 2 +- .../ai/client/generativeai/type/Part.kt | 8 +- .../client/generativeai/type/PlatformImage.kt | 13 + .../generativeai/type/PromptFeedback.kt | 2 +- .../generativeai/type/RequestOptions.kt | 3 +- .../client/generativeai/type/SafetySetting.kt | 2 +- .../ai/client/generativeai/type/Tool.kt | 2 +- .../ai/client/generativeai/type/ToolConfig.kt | 2 +- .../ai/client/generativeai/type/Type.kt | 7 +- .../client/generativeai/type/UsageMetadata.kt | 2 +- .../generativeai/type/PlatformImage.ios.kt | 44 + .../generativeai/GenerativeModelTests.kt | 42 +- .../generativeai/internal/util/conversions.kt | 292 ---- .../generativeai/internal/util/kotlin.kt | 41 - .../client/generativeai/java/ChatFutures.kt | 67 - .../java/GenerativeModelFutures.kt | 94 -- .../generativeai/type/FunctionParameter.kt | 19 - gradle.properties | 64 +- gradle/libs.versions.toml | 39 + licenses/APACHE-2.0 | 2 +- plugins/README.md | 116 -- plugins/build.gradle.kts | 64 - plugins/settings.gradle.kts | 32 - .../com/google/gradle/plugins/ApiPlugin.kt | 100 -- .../google/gradle/plugins/ChangelogPlugin.kt | 139 -- .../google/gradle/plugins/LicensePlugin.kt | 91 -- .../gradle/plugins/MultiProjectPlugin.kt | 84 -- .../google/gradle/plugins/ReleasePlugin.kt | 105 -- .../google/gradle/tasks/ApplyLicenseTask.kt | 90 -- .../gradle/tasks/CombineApiChangesTask.kt | 51 - .../gradle/tasks/CombineReleaseNotesTask.kt | 65 - .../com/google/gradle/tasks/CopyFileTask.kt | 49 - .../google/gradle/tasks/FindChangesTask.kt | 50 - .../com/google/gradle/tasks/MakeChangeTask.kt | 61 - .../gradle/tasks/MakeReleaseNotesTask.kt | 74 - .../gradle/tasks/ValidateLicenseTask.kt | 92 -- .../google/gradle/tasks/VersionBumpTask.kt | 77 -- .../gradle/tasks/WarnAboutApiChangesTask.kt | 87 -- .../java/com/google/gradle/types/Changelog.kt | 52 - .../google/gradle/types/LicenseTemplate.kt | 109 -- .../com/google/gradle/types/LinesChanged.kt | 88 -- .../com/google/gradle/types/ModuleVersion.kt | 242 ---- .../gradle/types/RandomWordsGenerator.kt | 49 - .../java/com/google/gradle/util/gradle.kt | 233 ---- .../java/com/google/gradle/util/kotlin.kt | 66 - plugins/src/main/resources/words.txt | 251 ---- settings.gradle.kts | 27 +- 157 files changed, 1230 insertions(+), 14066 deletions(-) delete mode 100644 api/common/0.1.0.api delete mode 100644 api/common/0.2.0.api delete mode 100644 api/common/0.3.0.api delete mode 100644 api/common/0.4.0.api delete mode 100644 api/generativeai/0.1.0.api delete mode 100644 api/generativeai/0.1.1.api delete mode 100644 api/generativeai/0.1.2.api delete mode 100644 api/generativeai/0.2.0.api delete mode 100644 api/generativeai/0.2.2.api delete mode 100644 api/generativeai/0.3.0.api delete mode 100644 api/generativeai/0.4.0.api delete mode 100644 api/generativeai/0.5.0.api create mode 100644 common/src/androidMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt rename common/src/{main => commonMain}/AndroidManifest.xml (100%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/APIController.kt (92%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/Exceptions.kt (98%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/Request.kt (76%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/RequestOptions.kt (95%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/Response.kt (81%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/client/Types.kt (74%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/server/Types.kt (65%) create mode 100644 common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/shared/Types.kt create mode 100644 common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/util/kotlin.kt (63%) rename common/src/{main/kotlin/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/common/util/ktor.kt (98%) create mode 100644 common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/serialization.kt create mode 100644 common/src/iosMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt create mode 100644 common/src/jsMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt create mode 100644 common/src/jvmMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt delete mode 100644 common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt delete mode 100644 common/src/main/kotlin/com/google/ai/client/generativeai/common/util/serialization.kt rename common/src/test/{java/com/google => kotlin/dev/shreyaspatil}/ai/client/generativeai/common/APIControllerTests.kt (94%) rename common/src/test/{java/com/google => kotlin/dev/shreyaspatil}/ai/client/generativeai/common/StreamingSnapshotTests.kt (94%) rename common/src/test/{java/com/google => kotlin/dev/shreyaspatil}/ai/client/generativeai/common/UnarySnapshotTests.kt (94%) rename common/src/test/{java/com/google => kotlin/dev/shreyaspatil}/ai/client/generativeai/common/util/kotlin.kt (95%) rename common/src/test/{java/com/google => kotlin/dev/shreyaspatil}/ai/client/generativeai/common/util/tests.kt (90%) delete mode 100644 generativeai-android-sample/.google/packaging.yaml delete mode 100644 generativeai-android-sample/README.md delete mode 100644 generativeai-android-sample/app/build.gradle.kts delete mode 100644 generativeai-android-sample/app/src/main/AndroidManifest.xml delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MainActivity.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatMessage.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatScreen.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatUiState.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatViewModel.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningScreen.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningUiState.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeScreen.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeUiState.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeViewModel.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Color.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Theme.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Type.kt delete mode 100644 generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/util/UriSaver.kt delete mode 100644 generativeai-android-sample/app/src/main/res/drawable/ic_launcher_background.xml delete mode 100644 generativeai-android-sample/app/src/main/res/drawable/ic_launcher_foreground.xml delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher.xml delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-hdpi/ic_launcher.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-mdpi/ic_launcher.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-xhdpi/ic_launcher.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp delete mode 100644 generativeai-android-sample/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp delete mode 100644 generativeai-android-sample/app/src/main/res/values/colors.xml delete mode 100644 generativeai-android-sample/app/src/main/res/values/strings.xml delete mode 100644 generativeai-android-sample/app/src/main/res/values/themes.xml delete mode 100644 generativeai-android-sample/app/src/main/res/xml/backup_rules.xml delete mode 100644 generativeai-android-sample/app/src/main/res/xml/data_extraction_rules.xml delete mode 100644 generativeai-android-sample/build.gradle.kts delete mode 100644 generativeai-android-sample/gradle.properties delete mode 100644 generativeai-android-sample/gradle/wrapper/gradle-wrapper.jar delete mode 100644 generativeai-android-sample/gradle/wrapper/gradle-wrapper.properties delete mode 100755 generativeai-android-sample/gradlew delete mode 100644 generativeai-android-sample/gradlew.bat delete mode 100644 generativeai-android-sample/screenshots/screenshots.png delete mode 100644 generativeai-android-sample/settings.gradle.kts rename generativeai/src/{main => androidMain}/AndroidManifest.xml (100%) create mode 100644 generativeai/src/androidMain/kotlin/dev/shreyaspatil/ai/client/generativeai/type/PlatformImage.android.kt delete mode 100644 generativeai/src/androidTest/java/com/google/ai/client/generativeai/ExampleInstrumentedTest.kt rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/Chat.kt (87%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/GenerativeModel.kt (79%) create mode 100644 generativeai/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/internal/util/conversions.kt rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/BlockThreshold.kt (95%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/Candidate.kt (97%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/Content.kt (91%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/CountTokensResponse.kt (93%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/Exceptions.kt (81%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/FunctionCallingConfig.kt (96%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/FunctionDeclarations.kt (90%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/GenerateContentResponse.kt (95%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/GenerationConfig.kt (96%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/GenerativeBeta.kt (93%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/HarmCategory.kt (94%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/HarmProbability.kt (95%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/Part.kt (93%) create mode 100644 generativeai/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/type/PlatformImage.kt rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/PromptFeedback.kt (95%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/RequestOptions.kt (95%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/SafetySetting.kt (94%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/Tool.kt (94%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/ToolConfig.kt (96%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/Type.kt (84%) rename generativeai/src/{main/java/com/google => commonMain/kotlin/dev/shreyaspatil}/ai/client/generativeai/type/UsageMetadata.kt (94%) create mode 100644 generativeai/src/iosMain/kotlin/dev/shreyaspatil/ai/client/generativeai/type/PlatformImage.ios.kt rename generativeai/src/{test/java/com/google => jvmTest/kotlin/dev/shreyaspatil}/ai/client/generativeai/GenerativeModelTests.kt (73%) delete mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/conversions.kt delete mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/internal/util/kotlin.kt delete mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/java/ChatFutures.kt delete mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/java/GenerativeModelFutures.kt delete mode 100644 generativeai/src/main/java/com/google/ai/client/generativeai/type/FunctionParameter.kt create mode 100644 gradle/libs.versions.toml delete mode 100644 plugins/README.md delete mode 100644 plugins/build.gradle.kts delete mode 100644 plugins/settings.gradle.kts delete mode 100644 plugins/src/main/java/com/google/gradle/plugins/ApiPlugin.kt delete mode 100644 plugins/src/main/java/com/google/gradle/plugins/ChangelogPlugin.kt delete mode 100644 plugins/src/main/java/com/google/gradle/plugins/LicensePlugin.kt delete mode 100644 plugins/src/main/java/com/google/gradle/plugins/MultiProjectPlugin.kt delete mode 100644 plugins/src/main/java/com/google/gradle/plugins/ReleasePlugin.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/ApplyLicenseTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/CombineApiChangesTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/CombineReleaseNotesTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/CopyFileTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/FindChangesTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/MakeChangeTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/MakeReleaseNotesTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/ValidateLicenseTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/VersionBumpTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/tasks/WarnAboutApiChangesTask.kt delete mode 100644 plugins/src/main/java/com/google/gradle/types/Changelog.kt delete mode 100644 plugins/src/main/java/com/google/gradle/types/LicenseTemplate.kt delete mode 100644 plugins/src/main/java/com/google/gradle/types/LinesChanged.kt delete mode 100644 plugins/src/main/java/com/google/gradle/types/ModuleVersion.kt delete mode 100644 plugins/src/main/java/com/google/gradle/types/RandomWordsGenerator.kt delete mode 100644 plugins/src/main/java/com/google/gradle/util/gradle.kt delete mode 100644 plugins/src/main/java/com/google/gradle/util/kotlin.kt delete mode 100644 plugins/src/main/resources/words.txt diff --git a/.github/workflows/build_release.yml b/.github/workflows/build_release.yml index 098b5d20..1f3f225f 100644 --- a/.github/workflows/build_release.yml +++ b/.github/workflows/build_release.yml @@ -1,23 +1,22 @@ # Perform a Gradle `build` which includes `assemble`, `check`, `test` # of the projects, and uploads the generated artifacts. -name: Generate release artifacts +name: Publish Library # Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: + inputs: + versionName: + description: 'Version Name' + required: true # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: # This workflow contains a single job called "build" - build: + release: # The type of runner that the job will run on - runs-on: ubuntu-latest + runs-on: macos-latest steps: - uses: actions/checkout@v2 @@ -26,27 +25,45 @@ jobs: distribution: 'temurin' java-version: '17' cache: gradle - - name: Build the generativeai release artifacts - run: ./gradlew generativeai:publishAllPublicationsToMavenRepository - - name: Upload the generativeai artifacts - uses: actions/upload-artifact@v2 - with: - name: generative-ai-android - path: generativeai/m2 - retention-days: 5 - - name: Build the common release artifacts - run: ./gradlew common:publishAllPublicationsToMavenRepository - - name: Upload the common artifacts - uses: actions/upload-artifact@v2 + + - name: Build with Gradle + uses: gradle/gradle-build-action@v2 with: - name: common-artifacts - path: common/m2 - retention-days: 5 - - name: Build the release artifacts for all sdks - run: ./gradlew publishAllPublicationsToMavenRepository - - name: Upload the generated artifacts - uses: actions/upload-artifact@v2 + arguments: test + + - name: Publish Library + run: | + echo "Publishing library🚀" + ./gradlew :generativeai:publish --no-configuration-cache + echo "Published Library✅" + + echo "Releasing library...🚀" + ./gradlew :generativeai:closeAndReleaseRepository --no-configuration-cache + echo "Released Library✅" + env: + ORG_GRADLE_PROJECT_VERSION_NAME: ${{ github.event.inputs.versionName }} + ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }} + ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }} + ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + + - name: Create and push tag + run: | + git config --global user.email "shreyaspatilg@gmail.com" + git config --global user.name "$GITHUB_ACTOR" + + git tag -a $TAG -m "Release $TAG" + git push origin $TAG + env: + TAG: v${{ github.event.inputs.versionName }} + + - name: Create Release on GitHub + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - name: release-artifacts - path: m2 - retention-days: 5 + tag_name: v${{ github.event.inputs.versionName }} + release_name: v${{ github.event.inputs.versionName }} + draft: true + prerelease: false \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db177d4a..b0f5c2d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,28 +1,10 @@ # How to Contribute -We'd love to accept your patches and contributions to this project. There are -just a few small guidelines you need to follow. - -## Contributor License Agreement - -Contributions to this project must be accompanied by a Contributor License -Agreement. You (or your employer) retain the copyright to your contribution; -this simply gives us permission to use and redistribute your contributions as -part of the project. Head over to to see -your current agreements on file or to sign a new one. - -You generally only need to submit a CLA once, so if you've already submitted one -(even if it was for a different project), you probably don't need to do it -again. +We'd love to accept your patches and contributions to this project. ## Code reviews All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more -information on using pull requests. - -## Community Guidelines - -This project follows -[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). +information on using pull requests. \ No newline at end of file diff --git a/README.md b/README.md index 04533937..94e35b2e 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,26 @@ -# Google AI SDK for Android +# Google Generative AI SDK for Kotlin Multiplatform ✨ + -> [!CAUTION] -> **The Google AI SDK for Android is recommended for prototyping only.** If you plan to enable billing, we strongly recommend that you use a backend SDK to access the Google AI Gemini API. You risk -> potentially exposing your API key to malicious actors if you embed your API key directly in your Android app or fetch it remotely at runtime. - - -The Google AI client SDK for Android enables developers to use Google's state-of-the-art generative AI models (like Gemini) to build AI-powered features and applications. This SDK supports use cases like: +The Google Generative AI client SDK for Kotlin Multiplatform enables developers to use Google's +state-of-the-art generative AI models (like Gemini) to build AI-powered features and applications. +This SDK supports use cases like: - Generate text from text-only input - Generate text from text-and-images input (multimodal) - Build multi-turn conversations (chat) -For example, with just a few lines of code, you can access Gemini's multimodal capabilities to generate text from text-and-image input: +For example, with just a few lines of code, you can access Gemini's multimodal capabilities to +generate text from text-and-image input: ```kotlin val generativeModel = GenerativeModel( - modelName = "gemini-1.5-pro-latest", - apiKey = BuildConfig.apiKey + modelName = "gemini-1.0-pro-vision-latest", + apiKey = "YOUR_API_KEY" ) -val cookieImage: Bitmap = // ... -val inputContent = content() { - image(cookieImage) +val cookieImageData: ByteArray = // ... +val inputContent = content { + image(PlatformImage(cookieImageData)) text("Does this look store-bought or homemade?") } @@ -29,41 +28,71 @@ val response = generativeModel.generateContent(inputContent) print(response.text) ``` -> [!NOTE] -> If you want to access Gemini on-device (Gemini Nano), check out the [Google AI Edge SDK for Android](https://ai.google.dev/tutorials/android_aicore), which is enabled via Android AICore. +Supports the following Kotlin Multiplatform targets: +- [x] Android +- [x] iOS +- [x] JVM +- [x] JS +- [x] Wasm (_Use this [version](https://github.com/PatilShreyas/generative-ai-kmp/releases/tag/v0.2.0-1.0.0-wasm)_) + +## Installation and usage -## Try out the sample Android app +Add the following dependency to your Kotlin Multiplatform project for `commonMain`: -This repository contains a sample app demonstrating how the SDK can access and utilize the Gemini model for various use cases. +```kotlin +commonMain.dependencies { + implementation("dev.shreyaspatil.generativeai:generativeai-google:") +} +``` -To try out the sample app you can directly import the project from Android Studio -via **File > New > Import Sample** and searching for *Generative AI Sample* or follow these steps below: +Check for latest version in the [releases](https://github.com/PatilShreyas/generative-ai-kmp/releases). -1. Check out this repository.\ -`git clone https://github.com/google/generative-ai-android` +For detailed instructions, you can find a [quickstart](https://ai.google.dev/tutorials/android_quickstart) +for the Google AI client SDK for Android (_Since this is a Fork of the original project by Google_). -1. [Obtain an API key](https://makersuite.google.com/app/apikey) to use with the Google AI SDKs. +This quickstart describes how to add your API key and the SDK's dependency to your app, +initialize the model, and then call the API to access the model. It also describes some additional +use cases and features, like streaming, counting tokens, and controlling responses. -1. Open and build the sample app in the `generativeai-android-sample` folder of this repo. +### Releases +The versioning scheme is of the form `X-Y` where: -1. Paste your API key into the `apiKey` property in the `local.properties` file. +X is the _Generative AI Android SDK_ version that is being tracked. +Y is the _Multiplatform SDK_ version. +For example, if _Generative AI Android SDK_ is on `0.2.2` and _Multiplatform SDK_ is on `1.0.0`, the artifact for a release will be `dev.shreyaspatil.generativeai:generativeai-google:0.2.2-1.0.0`. -1. Run the app. +## Try sample app -## Installation and usage +Try these apps built with this SDK by the community: -Add the dependency `implementation("com.google.ai.client.generativeai:generativeai:"`) to your Android project. +- [PatilShreyas/ChaKt](https://github.com/PatilShreyas/ChaKt-KMP): Chat-prompt based app for Android, iOS, Desktop, Web. Powered by this multiplatform SDK. +- [joreilly/GeminiKMP](https://github.com/joreilly/GeminiKMP): Kotlin Multiplatform sample that uses Gemini Generative AI APIs. Runs on Android, iOS, Desktop, WearOS and Wasm-based Compose for Web. -For detailed instructions, you can find a [quickstart](https://ai.google.dev/tutorials/android_quickstart) for the Google AI client SDK for Android in the Google documentation. +*(Have you built anything on top of this SDK? Let's add it here)* -This quickstart describes how to add your API key and the SDK's dependency to your app, initialize the model, and then call the API to access the model. It also describes some additional use cases and features, like streaming, counting tokens, and controlling responses. ## Documentation -Find complete documentation for the Google AI SDKs and the Gemini model in the Google documentation:\ -https://ai.google.dev/docs +You can use the APIs mentioned in the [API Reference](https://ai.google.dev/tutorials/android_quickstart) +by the official library. + +From the official library, there are two major changes: +- Package `com.google` is mapped to `dev.shreyaspatil`. +- `Image(Bitmap)` was there for Android, instead `PlatformImage(ByteArray)` is used for KMP. + ## Contributing -See [Contributing](https://github.com/google/generative-ai-android/blob/main/CONTRIBUTING.md) for more information on contributing to the Google AI client SDK for Android. +See [Contributing](https://github.com/patilshreyas/generative-ai-kmp/blob/main/CONTRIBUTING.md) for +more information on contributing to the client SDK for multiplatform. + +## Credits +Thanks to Google for the project: [google/generative-ai-android](https://github.com/google/generative-ai-android). + +## Fork License +Copyright for portions of the code is held by [Google, 2023] as part of the project +[google/generative-ai-android](https://github.com/google/generative-ai-android) under the +Apache License, version 2.0. +All other copyrights for project *generative-ai-kmp* are held by [Shreyas Patil, 2024] under the +Apache License, Version 2.0. ## License diff --git a/api/common/0.1.0.api b/api/common/0.1.0.api deleted file mode 100644 index b3832966..00000000 --- a/api/common/0.1.0.api +++ /dev/null @@ -1,1188 +0,0 @@ -public final class com/google/ai/client/generativeai/common/APIController { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;)V - public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/common/APIControllerKt { - public static final fun getJSON ()Lkotlinx/serialization/json/Json; -} - -public final class com/google/ai/client/generativeai/common/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getModel ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; - public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/Integer;)V - public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/Integer; - public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getTotalBillableCharacters ()Ljava/lang/Integer; - public final fun getTotalTokens ()I - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun component5 ()Ljava/util/List; - public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun getModel ()Ljava/lang/String; - public final fun getSafetySettings ()Ljava/util/List; - public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun getTools ()Ljava/util/List; - public fun hashCode ()I - public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; - public fun ()V - public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Request { -} - -public final class com/google/ai/client/generativeai/common/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getEndpoint ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Response { -} - -public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; - public synthetic fun (IILjava/lang/Integer;ILkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/Integer;I)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/Integer; - public final fun component3 ()I - public final fun copy (ILjava/lang/Integer;I)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Integer;IILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidatesTokenCount ()Ljava/lang/Integer; - public final fun getPromptTokenCount ()I - public final fun getTotalTokenCount ()I - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { - public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; - public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; - public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V - public final fun component1 ()Ljava/lang/Float; - public final fun component2 ()Ljava/lang/Float; - public final fun component3 ()Ljava/lang/Integer; - public final fun component4 ()Ljava/lang/Integer; - public final fun component5 ()Ljava/lang/Integer; - public final fun component6 ()Ljava/util/List; - public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/util/List; - public final fun component5 ()Ljava/util/Map; - public final fun component6 ()Ljava/util/List; - public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getEnum ()Ljava/util/List; - public final fun getFormat ()Ljava/lang/String; - public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun getProperties ()Ljava/util/Map; - public final fun getRequired ()Ljava/util/List; - public final fun getType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionDeclarations ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationSources ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; - public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (IILjava/lang/String;Ljava/lang/String;)V - public final fun component1 ()I - public final fun component2 ()I - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/lang/String; - public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public fun equals (Ljava/lang/Object;)Z - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; - public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/String;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/String; - public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun equals (Ljava/lang/Object;)Z - public final fun getCode ()I - public final fun getMessage ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; - public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun component2 ()Ljava/util/List; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public final fun component3 ()Ljava/lang/Boolean; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlocked ()Ljava/lang/Boolean; - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun equals (Ljava/lang/Object;)Z - public final fun getData ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; - public fun equals (Ljava/lang/Object;)Z - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileUri ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/Map;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/Map; - public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun equals (Ljava/lang/Object;)Z - public final fun getArgs ()Ljava/util/Map; - public final fun getName ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Lkotlinx/serialization/json/JsonObject; - public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getName ()Ljava/lang/String; - public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { - public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; -} - -public final class com/google/ai/client/generativeai/common/shared/Part$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public fun equals (Ljava/lang/Object;)Z - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getText ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { - public fun (Lkotlin/reflect/KClass;)V - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/util/SerializationKt { - public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; - public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; -} - diff --git a/api/common/0.2.0.api b/api/common/0.2.0.api deleted file mode 100644 index cce9da22..00000000 --- a/api/common/0.2.0.api +++ /dev/null @@ -1,1223 +0,0 @@ -public final class com/google/ai/client/generativeai/common/APIController { - public static final field Companion Lcom/google/ai/client/generativeai/common/APIController$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/common/APIController$Companion { -} - -public final class com/google/ai/client/generativeai/common/APIControllerKt { - public static final fun getJSON ()Lkotlinx/serialization/json/Json; -} - -public final class com/google/ai/client/generativeai/common/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getModel ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; - public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/Integer;)V - public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/Integer; - public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getTotalBillableCharacters ()Ljava/lang/Integer; - public final fun getTotalTokens ()I - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun component5 ()Ljava/util/List; - public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun component7 ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun getModel ()Ljava/lang/String; - public final fun getSafetySettings ()Ljava/util/List; - public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun getTools ()Ljava/util/List; - public fun hashCode ()I - public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; - public fun ()V - public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; -} - -public abstract interface class com/google/ai/client/generativeai/common/HeaderProvider { - public abstract fun generateHeaders (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Request { -} - -public final class com/google/ai/client/generativeai/common/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getEndpoint ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Response { -} - -public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; - public synthetic fun (IILjava/lang/Integer;ILkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/Integer;I)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/Integer; - public final fun component3 ()I - public final fun copy (ILjava/lang/Integer;I)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Integer;IILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidatesTokenCount ()Ljava/lang/Integer; - public final fun getPromptTokenCount ()I - public final fun getTotalTokenCount ()I - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { - public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; - public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; - public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V - public final fun component1 ()Ljava/lang/Float; - public final fun component2 ()Ljava/lang/Float; - public final fun component3 ()Ljava/lang/Integer; - public final fun component4 ()Ljava/lang/Integer; - public final fun component5 ()Ljava/lang/Integer; - public final fun component6 ()Ljava/util/List; - public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/util/List; - public final fun component5 ()Ljava/util/Map; - public final fun component6 ()Ljava/util/List; - public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getEnum ()Ljava/util/List; - public final fun getFormat ()Ljava/lang/String; - public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun getProperties ()Ljava/util/Map; - public final fun getRequired ()Ljava/util/List; - public final fun getType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionDeclarations ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationSources ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; - public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (IILjava/lang/String;Ljava/lang/String;)V - public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()I - public final fun component2 ()I - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/lang/String; - public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public fun equals (Ljava/lang/Object;)Z - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; - public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/String;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/String; - public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun equals (Ljava/lang/Object;)Z - public final fun getCode ()I - public final fun getMessage ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; - public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/HarmSeverity : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmSeverity$Companion; - public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmSeverity; -} - -public final class com/google/ai/client/generativeai/common/server/HarmSeverity$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun component2 ()Ljava/util/List; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public final fun component3 ()Ljava/lang/Boolean; - public final fun component4 ()Ljava/lang/Float; - public final fun component5 ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public final fun component6 ()Ljava/lang/Float; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlocked ()Ljava/lang/Boolean; - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public final fun getProbabilityScore ()Ljava/lang/Float; - public final fun getSeverity ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public final fun getSeverityScore ()Ljava/lang/Float; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun equals (Ljava/lang/Object;)Z - public final fun getData ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; - public fun equals (Ljava/lang/Object;)Z - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileUri ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/Map;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/Map; - public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun equals (Ljava/lang/Object;)Z - public final fun getArgs ()Ljava/util/Map; - public final fun getName ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Lkotlinx/serialization/json/JsonObject; - public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getName ()Ljava/lang/String; - public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { - public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; -} - -public final class com/google/ai/client/generativeai/common/shared/Part$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public fun equals (Ljava/lang/Object;)Z - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getText ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { - public fun (Lkotlin/reflect/KClass;)V - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/util/SerializationKt { - public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; - public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; -} - diff --git a/api/common/0.3.0.api b/api/common/0.3.0.api deleted file mode 100644 index cce9da22..00000000 --- a/api/common/0.3.0.api +++ /dev/null @@ -1,1223 +0,0 @@ -public final class com/google/ai/client/generativeai/common/APIController { - public static final field Companion Lcom/google/ai/client/generativeai/common/APIController$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/common/APIController$Companion { -} - -public final class com/google/ai/client/generativeai/common/APIControllerKt { - public static final fun getJSON ()Lkotlinx/serialization/json/Json; -} - -public final class com/google/ai/client/generativeai/common/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getModel ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; - public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/Integer;)V - public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/Integer; - public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getTotalBillableCharacters ()Ljava/lang/Integer; - public final fun getTotalTokens ()I - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun component5 ()Ljava/util/List; - public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun component7 ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun getModel ()Ljava/lang/String; - public final fun getSafetySettings ()Ljava/util/List; - public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun getTools ()Ljava/util/List; - public fun hashCode ()I - public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; - public fun ()V - public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; -} - -public abstract interface class com/google/ai/client/generativeai/common/HeaderProvider { - public abstract fun generateHeaders (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Request { -} - -public final class com/google/ai/client/generativeai/common/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getEndpoint ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Response { -} - -public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; - public synthetic fun (IILjava/lang/Integer;ILkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/Integer;I)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/Integer; - public final fun component3 ()I - public final fun copy (ILjava/lang/Integer;I)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Integer;IILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidatesTokenCount ()Ljava/lang/Integer; - public final fun getPromptTokenCount ()I - public final fun getTotalTokenCount ()I - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { - public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; - public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; - public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V - public final fun component1 ()Ljava/lang/Float; - public final fun component2 ()Ljava/lang/Float; - public final fun component3 ()Ljava/lang/Integer; - public final fun component4 ()Ljava/lang/Integer; - public final fun component5 ()Ljava/lang/Integer; - public final fun component6 ()Ljava/util/List; - public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/util/List; - public final fun component5 ()Ljava/util/Map; - public final fun component6 ()Ljava/util/List; - public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getEnum ()Ljava/util/List; - public final fun getFormat ()Ljava/lang/String; - public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun getProperties ()Ljava/util/Map; - public final fun getRequired ()Ljava/util/List; - public final fun getType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionDeclarations ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationSources ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; - public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (IILjava/lang/String;Ljava/lang/String;)V - public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()I - public final fun component2 ()I - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/lang/String; - public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public fun equals (Ljava/lang/Object;)Z - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; - public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/String;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/String; - public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun equals (Ljava/lang/Object;)Z - public final fun getCode ()I - public final fun getMessage ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; - public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/HarmSeverity : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmSeverity$Companion; - public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmSeverity; -} - -public final class com/google/ai/client/generativeai/common/server/HarmSeverity$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun component2 ()Ljava/util/List; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public final fun component3 ()Ljava/lang/Boolean; - public final fun component4 ()Ljava/lang/Float; - public final fun component5 ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public final fun component6 ()Ljava/lang/Float; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlocked ()Ljava/lang/Boolean; - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public final fun getProbabilityScore ()Ljava/lang/Float; - public final fun getSeverity ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public final fun getSeverityScore ()Ljava/lang/Float; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun equals (Ljava/lang/Object;)Z - public final fun getData ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; - public fun equals (Ljava/lang/Object;)Z - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileUri ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/Map;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/Map; - public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun equals (Ljava/lang/Object;)Z - public final fun getArgs ()Ljava/util/Map; - public final fun getName ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Lkotlinx/serialization/json/JsonObject; - public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getName ()Ljava/lang/String; - public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { - public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; -} - -public final class com/google/ai/client/generativeai/common/shared/Part$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public fun equals (Ljava/lang/Object;)Z - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getText ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { - public fun (Lkotlin/reflect/KClass;)V - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/util/SerializationKt { - public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; - public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; -} - diff --git a/api/common/0.4.0.api b/api/common/0.4.0.api deleted file mode 100644 index ad749907..00000000 --- a/api/common/0.4.0.api +++ /dev/null @@ -1,1225 +0,0 @@ -public final class com/google/ai/client/generativeai/common/APIController { - public static final field Companion Lcom/google/ai/client/generativeai/common/APIController$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/RequestOptions;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/HeaderProvider;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/common/APIController$Companion { -} - -public final class com/google/ai/client/generativeai/common/APIControllerKt { - public static final fun getJSON ()Lkotlinx/serialization/json/Json; -} - -public final class com/google/ai/client/generativeai/common/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensRequest$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getModel ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/CountTokensResponse$Companion; - public synthetic fun (IILjava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/Integer;)V - public synthetic fun (ILjava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/Integer; - public final fun copy (ILjava/lang/Integer;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/CountTokensResponse;ILjava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getTotalBillableCharacters ()Ljava/lang/Integer; - public final fun getTotalTokens ()I - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/CountTokensResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/CountTokensResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/CountTokensResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/CountTokensResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/CountTokensResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/GRpcError;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getError ()Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GRpcErrorResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GRpcErrorResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GRpcErrorResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GRpcErrorResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest : com/google/ai/client/generativeai/common/Request { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentRequest$Companion; - public synthetic fun (ILjava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun component5 ()Ljava/util/List; - public final fun component6 ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun component7 ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun copy (Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/shared/Content;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public fun equals (Ljava/lang/Object;)Z - public final fun getContents ()Ljava/util/List; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public final fun getModel ()Ljava/lang/String; - public final fun getSafetySettings ()Ljava/util/List; - public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun getToolConfig ()Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public final fun getTools ()Ljava/util/List; - public fun hashCode ()I - public final fun setToolConfig (Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentRequest;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentRequest$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentRequest; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentRequest;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentRequest$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse : com/google/ai/client/generativeai/common/Response { - public static final field Companion Lcom/google/ai/client/generativeai/common/GenerateContentResponse$Companion; - public fun ()V - public synthetic fun (ILjava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/util/List; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public final fun copy (Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/UsageMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/GenerateContentResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/GenerateContentResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/GenerateContentResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/GenerateContentResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public abstract class com/google/ai/client/generativeai/common/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/common/GoogleGenerativeAIException; -} - -public abstract interface class com/google/ai/client/generativeai/common/HeaderProvider { - public abstract fun generateHeaders (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public abstract fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/common/InvalidAPIKeyException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/InvalidStateException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/PromptBlockedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/QuotaExceededException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Request { -} - -public final class com/google/ai/client/generativeai/common/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Ljava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getEndpoint ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/common/RequestTimeoutException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/Response { -} - -public final class com/google/ai/client/generativeai/common/ResponseStoppedException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/common/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/common/SerializationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/ServerException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnknownException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UnsupportedUserLocationException : com/google/ai/client/generativeai/common/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/UsageMetadata$Companion; - public fun ()V - public synthetic fun (ILjava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V - public synthetic fun (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/Integer; - public final fun component2 ()Ljava/lang/Integer; - public final fun component3 ()Ljava/lang/Integer; - public final fun copy (Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/UsageMetadata;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidatesTokenCount ()Ljava/lang/Integer; - public final fun getPromptTokenCount ()Ljava/lang/Integer; - public final fun getTotalTokenCount ()Ljava/lang/Integer; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/UsageMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/UsageMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/UsageMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/UsageMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/UsageMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getMode ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode : java/lang/Enum { - public static final field ANY Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field AUTO Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion; - public static final field NONE Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; - public static fun values ()[Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionCallingConfig$Mode$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public final fun getParameters ()Lcom/google/ai/client/generativeai/common/client/Schema; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/FunctionDeclaration;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/FunctionDeclaration$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/GenerationConfig$Companion; - public synthetic fun (ILjava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)V - public final fun component1 ()Ljava/lang/Float; - public final fun component2 ()Ljava/lang/Float; - public final fun component3 ()Ljava/lang/Integer; - public final fun component4 ()Ljava/lang/Integer; - public final fun component5 ()Ljava/lang/Integer; - public final fun component6 ()Ljava/util/List; - public final fun copy (Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Ljava/lang/Float;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/GenerationConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/GenerationConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/GenerationConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/GenerationConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/GenerationConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Schema$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/util/List; - public final fun component5 ()Ljava/util/Map; - public final fun component6 ()Ljava/util/List; - public final fun component7 ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;)Lcom/google/ai/client/generativeai/common/client/Schema; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Schema;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/common/client/Schema;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Schema; - public fun equals (Ljava/lang/Object;)Z - public final fun getDescription ()Ljava/lang/String; - public final fun getEnum ()Ljava/util/List; - public final fun getFormat ()Ljava/lang/String; - public final fun getItems ()Lcom/google/ai/client/generativeai/common/client/Schema; - public final fun getProperties ()Ljava/util/Map; - public final fun getRequired ()Ljava/util/List; - public final fun getType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Schema;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Schema$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Schema$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Schema; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Schema;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Schema$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/Tool$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/client/Tool; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/Tool;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/Tool; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionDeclarations ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/Tool;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/Tool$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/Tool$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/Tool; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/Tool;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/Tool$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig { - public static final field Companion Lcom/google/ai/client/generativeai/common/client/ToolConfig$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public final fun copy (Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/common/client/FunctionCallingConfig; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/client/ToolConfig;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/client/ToolConfig$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/client/ToolConfig; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/client/ToolConfig;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/client/ToolConfig$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/BlockReason$Companion; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/BlockReason; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/BlockReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/BlockReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/BlockReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/BlockReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/Candidate$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun component3 ()Ljava/util/List; - public final fun component4 ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/Candidate;Lcom/google/ai/client/generativeai/common/shared/Content;Lcom/google/ai/client/generativeai/common/server/FinishReason;Ljava/util/List;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationMetadata ()Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public final fun getContent ()Lcom/google/ai/client/generativeai/common/shared/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/common/server/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/Candidate;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/Candidate$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/Candidate; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/Candidate;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/Candidate$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationMetadata$Companion; - public synthetic fun (ILjava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun component1 ()Ljava/util/List; - public final fun copy (Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public fun equals (Ljava/lang/Object;)Z - public final fun getCitationSources ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationMetadata;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationMetadata$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationMetadata; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationMetadata;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationMetadata$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/CitationSources$Companion; - public synthetic fun (IIILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (IILjava/lang/String;Ljava/lang/String;)V - public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()I - public final fun component2 ()I - public final fun component3 ()Ljava/lang/String; - public final fun component4 ()Ljava/lang/String; - public final fun copy (IILjava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/CitationSources;IILjava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public fun equals (Ljava/lang/Object;)Z - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/CitationSources;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/CitationSources$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/CitationSources; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/CitationSources;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/CitationSources$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/FinishReason$Companion; - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/FinishReason; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReason$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/FinishReasonSerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/FinishReasonSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/FinishReason; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/FinishReason;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/GRpcError$Companion; - public synthetic fun (IILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (ILjava/lang/String;)V - public final fun component1 ()I - public final fun component2 ()Ljava/lang/String; - public final fun copy (ILjava/lang/String;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/GRpcError;ILjava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public fun equals (Ljava/lang/Object;)Z - public final fun getCode ()I - public final fun getMessage ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/GRpcError;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/GRpcError$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/GRpcError; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/GRpcError;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/GRpcError$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmProbability$Companion; - public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmProbability; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbability$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/HarmProbabilitySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/HarmProbabilitySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/HarmProbability;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/server/HarmSeverity : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/HarmSeverity$Companion; - public static final field HIGH Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field LOW Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field MEDIUM Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public static fun values ()[Lcom/google/ai/client/generativeai/common/server/HarmSeverity; -} - -public final class com/google/ai/client/generativeai/common/server/HarmSeverity$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/PromptFeedback$Companion; - public fun ()V - public synthetic fun (ILcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun component2 ()Ljava/util/List; - public final fun copy (Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lcom/google/ai/client/generativeai/common/server/BlockReason;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/common/server/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/PromptFeedback;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/PromptFeedback$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/PromptFeedback; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/PromptFeedback;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/PromptFeedback$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating { - public static final field Companion Lcom/google/ai/client/generativeai/common/server/SafetyRating$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)V - public synthetic fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public final fun component3 ()Ljava/lang/Boolean; - public final fun component4 ()Ljava/lang/Float; - public final fun component5 ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public final fun component6 ()Ljava/lang/Float; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/server/HarmProbability;Ljava/lang/Boolean;Ljava/lang/Float;Lcom/google/ai/client/generativeai/common/server/HarmSeverity;Ljava/lang/Float;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public fun equals (Ljava/lang/Object;)Z - public final fun getBlocked ()Ljava/lang/Boolean; - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/common/server/HarmProbability; - public final fun getProbabilityScore ()Ljava/lang/Float; - public final fun getSeverity ()Lcom/google/ai/client/generativeai/common/server/HarmSeverity; - public final fun getSeverityScore ()Ljava/lang/Float; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/server/SafetyRating;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/server/SafetyRating$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/server/SafetyRating; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/server/SafetyRating;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/server/SafetyRating$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Blob$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Blob;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun equals (Ljava/lang/Object;)Z - public final fun getData ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Blob$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Blob; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Blob$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/BlobPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/Blob;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/Blob;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/Blob;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lcom/google/ai/client/generativeai/common/shared/Blob;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getInlineData ()Lcom/google/ai/client/generativeai/common/shared/Blob; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/BlobPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/BlobPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/BlobPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/BlobPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/BlobPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Content$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/List;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/List; - public final fun copy (Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/common/shared/Content; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/Content;Ljava/lang/String;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/Content; - public fun equals (Ljava/lang/Object;)Z - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/Content;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/Content$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/Content$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/Content; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/Content;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/Content$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileData$Companion; - public synthetic fun (ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileData;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileUri ()Ljava/lang/String; - public final fun getMimeType ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileData$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileData; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileData$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FileDataPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FileData;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FileData;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FileData;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lcom/google/ai/client/generativeai/common/shared/FileData;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFileData ()Lcom/google/ai/client/generativeai/common/shared/FileData; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FileDataPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FileDataPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FileDataPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FileDataPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FileDataPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCall$Companion; - public synthetic fun (ILjava/lang/String;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Ljava/util/Map;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Ljava/util/Map; - public final fun copy (Ljava/lang/String;Ljava/util/Map;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Ljava/lang/String;Ljava/util/Map;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun equals (Ljava/lang/Object;)Z - public final fun getArgs ()Ljava/util/Map; - public final fun getName ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCall$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCall$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionCall;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionCall;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lcom/google/ai/client/generativeai/common/shared/FunctionCall;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/common/shared/FunctionCall; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionCallPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionCallPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/json/JsonObject;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)V - public final fun component1 ()Ljava/lang/String; - public final fun component2 ()Lkotlinx/serialization/json/JsonObject; - public final fun copy (Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Ljava/lang/String;Lkotlinx/serialization/json/JsonObject;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun equals (Ljava/lang/Object;)Z - public final fun getName ()Ljava/lang/String; - public final fun getResponse ()Lkotlinx/serialization/json/JsonObject; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponse$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponse$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/FunctionResponse;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lcom/google/ai/client/generativeai/common/shared/FunctionResponse;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public fun equals (Ljava/lang/Object;)Z - public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/common/shared/FunctionResponse; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/FunctionResponsePart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/FunctionResponsePart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold : java/lang/Enum { - public static final field BLOCK_LOW_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_NONE Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field BLOCK_ONLY_HIGH Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmBlockThreshold$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory : java/lang/Enum { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/HarmCategory$Companion; - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/common/shared/HarmCategory; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategory$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/HarmCategorySerializer : kotlinx/serialization/KSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/HarmCategorySerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public abstract interface class com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/Part$Companion; -} - -public final class com/google/ai/client/generativeai/common/shared/Part$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/PartSerializer : kotlinx/serialization/json/JsonContentPolymorphicSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/PartSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/SafetySetting$Companion; - public synthetic fun (ILcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)V - public final fun component1 ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun component2 ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public final fun copy (Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lcom/google/ai/client/generativeai/common/shared/HarmCategory;Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public fun equals (Ljava/lang/Object;)Z - public final fun getCategory ()Lcom/google/ai/client/generativeai/common/shared/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/common/shared/HarmBlockThreshold; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/SafetySetting;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/SafetySetting$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/SafetySetting; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/SafetySetting;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/SafetySetting$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart : com/google/ai/client/generativeai/common/shared/Part { - public static final field Companion Lcom/google/ai/client/generativeai/common/shared/TextPart$Companion; - public synthetic fun (ILjava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V - public fun (Ljava/lang/String;)V - public final fun component1 ()Ljava/lang/String; - public final fun copy (Ljava/lang/String;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public static synthetic fun copy$default (Lcom/google/ai/client/generativeai/common/shared/TextPart;Ljava/lang/String;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public fun equals (Ljava/lang/Object;)Z - public final fun getText ()Ljava/lang/String; - public fun hashCode ()I - public fun toString ()Ljava/lang/String; - public static final synthetic fun write$Self (Lcom/google/ai/client/generativeai/common/shared/TextPart;Lkotlinx/serialization/encoding/CompositeEncoder;Lkotlinx/serialization/descriptors/SerialDescriptor;)V -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$$serializer : kotlinx/serialization/internal/GeneratedSerializer { - public static final field INSTANCE Lcom/google/ai/client/generativeai/common/shared/TextPart$$serializer; - public fun childSerializers ()[Lkotlinx/serialization/KSerializer; - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Lcom/google/ai/client/generativeai/common/shared/TextPart; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Lcom/google/ai/client/generativeai/common/shared/TextPart;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V - public fun typeParametersSerializers ()[Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/shared/TextPart$Companion { - public final fun serializer ()Lkotlinx/serialization/KSerializer; -} - -public final class com/google/ai/client/generativeai/common/util/FirstOrdinalSerializer : kotlinx/serialization/KSerializer { - public fun (Lkotlin/reflect/KClass;)V - public fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Enum; - public synthetic fun deserialize (Lkotlinx/serialization/encoding/Decoder;)Ljava/lang/Object; - public fun getDescriptor ()Lkotlinx/serialization/descriptors/SerialDescriptor; - public fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Enum;)V - public synthetic fun serialize (Lkotlinx/serialization/encoding/Encoder;Ljava/lang/Object;)V -} - -public final class com/google/ai/client/generativeai/common/util/SerializationKt { - public static final fun enumValues (Lkotlin/reflect/KClass;)[Ljava/lang/Enum; - public static final fun getSerialName (Ljava/lang/Enum;)Ljava/lang/String; -} - diff --git a/api/generativeai/0.1.0.api b/api/generativeai/0.1.0.api deleted file mode 100644 index 17e6332b..00000000 --- a/api/generativeai/0.1.0.api +++ /dev/null @@ -1,284 +0,0 @@ -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getSafetySettings ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} diff --git a/api/generativeai/0.1.1.api b/api/generativeai/0.1.1.api deleted file mode 100644 index cfb46d60..00000000 --- a/api/generativeai/0.1.1.api +++ /dev/null @@ -1,292 +0,0 @@ -public final class com/google/ai/client/generativeai/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getSafetySettings ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun getEntries ()Lkotlin/enums/EnumEntries; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} diff --git a/api/generativeai/0.1.2.api b/api/generativeai/0.1.2.api deleted file mode 100644 index c02f5705..00000000 --- a/api/generativeai/0.1.2.api +++ /dev/null @@ -1,289 +0,0 @@ -public final class com/google/ai/client/generativeai/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getSafetySettings ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} diff --git a/api/generativeai/0.2.0.api b/api/generativeai/0.2.0.api deleted file mode 100644 index 84cfcaa3..00000000 --- a/api/generativeai/0.2.0.api +++ /dev/null @@ -1,317 +0,0 @@ -public final class com/google/ai/client/generativeai/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; - public final fun getSafetySettings ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFuturesExtension { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFuturesExtension$Companion; - public fun ()V -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFuturesExtension$Companion { - public final fun generateContentStream (Lcom/google/ai/client/generativeai/java/GenerativeModelFutures;[Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - diff --git a/api/generativeai/0.2.2.api b/api/generativeai/0.2.2.api deleted file mode 100644 index 32054bcf..00000000 --- a/api/generativeai/0.2.2.api +++ /dev/null @@ -1,319 +0,0 @@ -public final class com/google/ai/client/generativeai/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; - public final fun getSafetySettings ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidAPIKeyException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/UnsupportedUserLocationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - diff --git a/api/generativeai/0.3.0.api b/api/generativeai/0.3.0.api deleted file mode 100644 index 5003fe01..00000000 --- a/api/generativeai/0.3.0.api +++ /dev/null @@ -1,496 +0,0 @@ -public final class com/google/ai/client/generativeai/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun executeFunction (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; - public final fun getSafetySettings ()Ljava/util/List; - public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getToolConfig ()Lcom/google/ai/client/generativeai/type/ToolConfig; - public final fun getTools ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addFileData (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FileDataPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun getMimeType ()Ljava/lang/String; - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/FourParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function5; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam4 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Ljava/util/Map;)V - public final fun getArgs ()Ljava/util/Map; - public final fun getName ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallingConfig { - public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode;)V - public final fun getMode ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallingConfig$Mode : java/lang/Enum { - public static final field ANY Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static final field AUTO Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static final field NONE Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; -} - -public abstract class com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public abstract fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public abstract fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/FunctionDeclarationsKt { - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)Lcom/google/ai/client/generativeai/type/FourParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)Lcom/google/ai/client/generativeai/type/ThreeParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)Lcom/google/ai/client/generativeai/type/TwoParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)Lcom/google/ai/client/generativeai/type/OneParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/NoParameterFunction; -} - -public final class com/google/ai/client/generativeai/type/FunctionParameter { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/FunctionType;)V - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/FunctionResponsePart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Lorg/json/JSONObject;)V - public final fun getName ()Ljava/lang/String; - public final fun getResponse ()Lorg/json/JSONObject; -} - -public final class com/google/ai/client/generativeai/type/FunctionType { - public static final field Companion Lcom/google/ai/client/generativeai/type/FunctionType$Companion; - public fun (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public final fun getName ()Ljava/lang/String; - public final fun getParse ()Lkotlin/jvm/functions/Function1; -} - -public final class com/google/ai/client/generativeai/type/FunctionType$Companion { - public final fun getARRAY ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getBOOLEAN ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getINTEGER ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getNUMBER ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getOBJECT ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getSTRING ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/type/FunctionCallPart; - public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/type/FunctionResponsePart; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract interface annotation class com/google/ai/client/generativeai/type/GenerativeBeta : java/lang/annotation/Annotation { -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidAPIKeyException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/NoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun execute (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function1; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/OneParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function2; - public final fun getParam ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asFileDataPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/FileDataPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/QuotaExceededException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Schema { - public static final field Companion Lcom/google/ai/client/generativeai/type/Schema$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun fromString (Ljava/lang/String;)Ljava/lang/Object; - public final fun getDescription ()Ljava/lang/String; - public final fun getEnum ()Ljava/util/List; - public final fun getFormat ()Ljava/lang/String; - public final fun getItems ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getName ()Ljava/lang/String; - public final fun getProperties ()Ljava/util/Map; - public final fun getRequired ()Ljava/util/List; - public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/Schema$Companion { - public final fun arr (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun bool (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun enum (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun int (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun num (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun obj (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun str (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/ThreeParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function4; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/Tool { - public fun (Ljava/util/List;)V - public final fun getFunctionDeclarations ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/ToolConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/ToolConfig$Companion; - public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig;)V - public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig; -} - -public final class com/google/ai/client/generativeai/type/ToolConfig$Companion { - public final fun always ()Lcom/google/ai/client/generativeai/type/ToolConfig; - public final fun never ()Lcom/google/ai/client/generativeai/type/ToolConfig; -} - -public final class com/google/ai/client/generativeai/type/TwoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function3; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/UnsupportedUserLocationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - diff --git a/api/generativeai/0.4.0.api b/api/generativeai/0.4.0.api deleted file mode 100644 index 5003fe01..00000000 --- a/api/generativeai/0.4.0.api +++ /dev/null @@ -1,496 +0,0 @@ -public final class com/google/ai/client/generativeai/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun executeFunction (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; - public final fun getSafetySettings ()Ljava/util/List; - public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getToolConfig ()Lcom/google/ai/client/generativeai/type/ToolConfig; - public final fun getTools ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addFileData (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FileDataPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun getMimeType ()Ljava/lang/String; - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/FourParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function5; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam4 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Ljava/util/Map;)V - public final fun getArgs ()Ljava/util/Map; - public final fun getName ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallingConfig { - public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode;)V - public final fun getMode ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallingConfig$Mode : java/lang/Enum { - public static final field ANY Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static final field AUTO Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static final field NONE Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; -} - -public abstract class com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public abstract fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public abstract fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/FunctionDeclarationsKt { - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)Lcom/google/ai/client/generativeai/type/FourParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)Lcom/google/ai/client/generativeai/type/ThreeParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)Lcom/google/ai/client/generativeai/type/TwoParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)Lcom/google/ai/client/generativeai/type/OneParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/NoParameterFunction; -} - -public final class com/google/ai/client/generativeai/type/FunctionParameter { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/FunctionType;)V - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/FunctionResponsePart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Lorg/json/JSONObject;)V - public final fun getName ()Ljava/lang/String; - public final fun getResponse ()Lorg/json/JSONObject; -} - -public final class com/google/ai/client/generativeai/type/FunctionType { - public static final field Companion Lcom/google/ai/client/generativeai/type/FunctionType$Companion; - public fun (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public final fun getName ()Ljava/lang/String; - public final fun getParse ()Lkotlin/jvm/functions/Function1; -} - -public final class com/google/ai/client/generativeai/type/FunctionType$Companion { - public final fun getARRAY ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getBOOLEAN ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getINTEGER ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getNUMBER ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getOBJECT ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getSTRING ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/type/FunctionCallPart; - public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/type/FunctionResponsePart; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract interface annotation class com/google/ai/client/generativeai/type/GenerativeBeta : java/lang/annotation/Annotation { -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidAPIKeyException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/NoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun execute (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function1; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/OneParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function2; - public final fun getParam ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asFileDataPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/FileDataPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/QuotaExceededException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Schema { - public static final field Companion Lcom/google/ai/client/generativeai/type/Schema$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun fromString (Ljava/lang/String;)Ljava/lang/Object; - public final fun getDescription ()Ljava/lang/String; - public final fun getEnum ()Ljava/util/List; - public final fun getFormat ()Ljava/lang/String; - public final fun getItems ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getName ()Ljava/lang/String; - public final fun getProperties ()Ljava/util/Map; - public final fun getRequired ()Ljava/util/List; - public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/Schema$Companion { - public final fun arr (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun bool (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun enum (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun int (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun num (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun obj (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun str (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/ThreeParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function4; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/Tool { - public fun (Ljava/util/List;)V - public final fun getFunctionDeclarations ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/ToolConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/ToolConfig$Companion; - public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig;)V - public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig; -} - -public final class com/google/ai/client/generativeai/type/ToolConfig$Companion { - public final fun always ()Lcom/google/ai/client/generativeai/type/ToolConfig; - public final fun never ()Lcom/google/ai/client/generativeai/type/ToolConfig; -} - -public final class com/google/ai/client/generativeai/type/TwoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function3; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/UnsupportedUserLocationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - diff --git a/api/generativeai/0.5.0.api b/api/generativeai/0.5.0.api deleted file mode 100644 index 7b3362ef..00000000 --- a/api/generativeai/0.5.0.api +++ /dev/null @@ -1,504 +0,0 @@ -public final class com/google/ai/client/generativeai/BuildConfig { - public static final field BUILD_TYPE Ljava/lang/String; - public static final field DEBUG Z - public static final field LIBRARY_PACKAGE_NAME Ljava/lang/String; - public static final field VERSION_NAME Ljava/lang/String; - public fun ()V -} - -public final class com/google/ai/client/generativeai/Chat { - public fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;)V - public synthetic fun (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getHistory ()Ljava/util/List; - public final fun sendMessage (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessage (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun sendMessageStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun sendMessageStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; -} - -public final class com/google/ai/client/generativeai/GenerativeModel { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;)V - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/GenerationConfig;Ljava/util/List;Lcom/google/ai/client/generativeai/type/RequestOptions;Ljava/util/List;Lcom/google/ai/client/generativeai/type/ToolConfig;Lcom/google/ai/client/generativeai/type/Content;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun countTokens (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun executeFunction (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Landroid/graphics/Bitmap;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent (Ljava/lang/String;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun generateContentStream (Landroid/graphics/Bitmap;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream (Ljava/lang/String;)Lkotlinx/coroutines/flow/Flow; - public final fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lkotlinx/coroutines/flow/Flow; - public final fun getApiKey ()Ljava/lang/String; - public final fun getGenerationConfig ()Lcom/google/ai/client/generativeai/type/GenerationConfig; - public final fun getModelName ()Ljava/lang/String; - public final fun getRequestOptions ()Lcom/google/ai/client/generativeai/type/RequestOptions; - public final fun getSafetySettings ()Ljava/util/List; - public final fun getSystemInstruction ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getToolConfig ()Lcom/google/ai/client/generativeai/type/ToolConfig; - public final fun getTools ()Ljava/util/List; - public final fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/Chat; - public static synthetic fun startChat$default (Lcom/google/ai/client/generativeai/GenerativeModel;Ljava/util/List;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/Chat; -} - -public abstract class com/google/ai/client/generativeai/java/ChatFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/ChatFutures$Companion; - public static final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun getChat ()Lcom/google/ai/client/generativeai/Chat; - public abstract fun sendMessage (Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun sendMessageStream (Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; -} - -public final class com/google/ai/client/generativeai/java/ChatFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/Chat;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public abstract class com/google/ai/client/generativeai/java/GenerativeModelFutures { - public static final field Companion Lcom/google/ai/client/generativeai/java/GenerativeModelFutures$Companion; - public abstract fun countTokens ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public static final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; - public abstract fun generateContent ([Lcom/google/ai/client/generativeai/type/Content;)Lcom/google/common/util/concurrent/ListenableFuture; - public abstract fun generateContentStream ([Lcom/google/ai/client/generativeai/type/Content;)Lorg/reactivestreams/Publisher; - public abstract fun getGenerativeModel ()Lcom/google/ai/client/generativeai/GenerativeModel; - public abstract fun startChat ()Lcom/google/ai/client/generativeai/java/ChatFutures; - public abstract fun startChat (Ljava/util/List;)Lcom/google/ai/client/generativeai/java/ChatFutures; -} - -public final class com/google/ai/client/generativeai/java/GenerativeModelFutures$Companion { - public final fun from (Lcom/google/ai/client/generativeai/GenerativeModel;)Lcom/google/ai/client/generativeai/java/GenerativeModelFutures; -} - -public final class com/google/ai/client/generativeai/type/BlobPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;[B)V - public final fun getBlob ()[B - public final fun getMimeType ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/BlockReason : java/lang/Enum { - public static final field OTHER Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/BlockReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockReason; -} - -public final class com/google/ai/client/generativeai/type/BlockThreshold : java/lang/Enum { - public static final field LOW_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field MEDIUM_AND_ABOVE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field NONE Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field ONLY_HIGH Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/BlockThreshold; - public static fun values ()[Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Candidate { - public final fun getCitationMetadata ()Ljava/util/List; - public final fun getContent ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getFinishReason ()Lcom/google/ai/client/generativeai/type/FinishReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/CitationMetadata { - public fun (IILjava/lang/String;Ljava/lang/String;)V - public synthetic fun (IILjava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getEndIndex ()I - public final fun getLicense ()Ljava/lang/String; - public final fun getStartIndex ()I - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content { - public fun (Ljava/lang/String;Ljava/util/List;)V - public synthetic fun (Ljava/lang/String;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/util/List;)V - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/Content$Builder { - public fun ()V - public final fun addBlob (Ljava/lang/String;[B)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addFileData (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addImage (Landroid/graphics/Bitmap;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addPart (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun addText (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Content$Builder; - public final fun build ()Lcom/google/ai/client/generativeai/type/Content; - public final fun getParts ()Ljava/util/List; - public final fun getRole ()Ljava/lang/String; - public final fun setParts (Ljava/util/List;)V - public final fun setRole (Ljava/lang/String;)V -} - -public final class com/google/ai/client/generativeai/type/ContentKt { - public static final fun content (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/Content; - public static synthetic fun content$default (Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lcom/google/ai/client/generativeai/type/Content; -} - -public final class com/google/ai/client/generativeai/type/CountTokensResponse { - public fun (I)V - public final fun component1 ()I - public final fun getTotalTokens ()I -} - -public final class com/google/ai/client/generativeai/type/FileDataPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public final fun getMimeType ()Ljava/lang/String; - public final fun getUri ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/FinishReason : java/lang/Enum { - public static final field MAX_TOKENS Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field OTHER Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field RECITATION Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field SAFETY Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field STOP Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/FinishReason; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FinishReason; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FinishReason; -} - -public final class com/google/ai/client/generativeai/type/FourParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function5; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam4 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Ljava/util/Map;)V - public final fun getArgs ()Ljava/util/Map; - public final fun getName ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallingConfig { - public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode;)V - public final fun getMode ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; -} - -public final class com/google/ai/client/generativeai/type/FunctionCallingConfig$Mode : java/lang/Enum { - public static final field ANY Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static final field AUTO Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static final field NONE Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; - public static fun values ()[Lcom/google/ai/client/generativeai/type/FunctionCallingConfig$Mode; -} - -public abstract class com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;)V - public abstract fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public abstract fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/FunctionDeclarationsKt { - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function5;)Lcom/google/ai/client/generativeai/type/FourParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)Lcom/google/ai/client/generativeai/type/ThreeParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)Lcom/google/ai/client/generativeai/type/TwoParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)Lcom/google/ai/client/generativeai/type/OneParameterFunction; - public static final fun defineFunction (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/NoParameterFunction; -} - -public final class com/google/ai/client/generativeai/type/FunctionParameter { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/FunctionType;)V - public final fun getDescription ()Ljava/lang/String; - public final fun getName ()Ljava/lang/String; - public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/FunctionResponsePart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;Lorg/json/JSONObject;)V - public final fun getName ()Ljava/lang/String; - public final fun getResponse ()Lorg/json/JSONObject; -} - -public final class com/google/ai/client/generativeai/type/FunctionType { - public static final field Companion Lcom/google/ai/client/generativeai/type/FunctionType$Companion; - public fun (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public final fun getName ()Ljava/lang/String; - public final fun getParse ()Lkotlin/jvm/functions/Function1; -} - -public final class com/google/ai/client/generativeai/type/FunctionType$Companion { - public final fun getARRAY ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getBOOLEAN ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getINTEGER ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getNUMBER ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getOBJECT ()Lcom/google/ai/client/generativeai/type/FunctionType; - public final fun getSTRING ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/GenerateContentResponse { - public fun (Ljava/util/List;Lcom/google/ai/client/generativeai/type/PromptFeedback;Lcom/google/ai/client/generativeai/type/UsageMetadata;)V - public final fun getCandidates ()Ljava/util/List; - public final fun getFunctionCall ()Lcom/google/ai/client/generativeai/type/FunctionCallPart; - public final fun getFunctionResponse ()Lcom/google/ai/client/generativeai/type/FunctionResponsePart; - public final fun getPromptFeedback ()Lcom/google/ai/client/generativeai/type/PromptFeedback; - public final fun getText ()Ljava/lang/String; - public final fun getUsageMetadata ()Lcom/google/ai/client/generativeai/type/UsageMetadata; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/GenerationConfig$Companion; - public synthetic fun (Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Float;Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getCandidateCount ()Ljava/lang/Integer; - public final fun getMaxOutputTokens ()Ljava/lang/Integer; - public final fun getStopSequences ()Ljava/util/List; - public final fun getTemperature ()Ljava/lang/Float; - public final fun getTopK ()Ljava/lang/Integer; - public final fun getTopP ()Ljava/lang/Float; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Builder { - public field candidateCount Ljava/lang/Integer; - public field maxOutputTokens Ljava/lang/Integer; - public field stopSequences Ljava/util/List; - public field temperature Ljava/lang/Float; - public field topK Ljava/lang/Integer; - public field topP Ljava/lang/Float; - public fun ()V - public final fun build ()Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfig$Companion { - public final fun builder ()Lcom/google/ai/client/generativeai/type/GenerationConfig$Builder; -} - -public final class com/google/ai/client/generativeai/type/GenerationConfigKt { - public static final fun generationConfig (Lkotlin/jvm/functions/Function1;)Lcom/google/ai/client/generativeai/type/GenerationConfig; -} - -public abstract interface annotation class com/google/ai/client/generativeai/type/GenerativeBeta : java/lang/annotation/Annotation { -} - -public abstract class com/google/ai/client/generativeai/type/GoogleGenerativeAIException : java/lang/RuntimeException { - public static final field Companion Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion; - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;Lkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/GoogleGenerativeAIException$Companion { - public final fun from (Ljava/lang/Throwable;)Lcom/google/ai/client/generativeai/type/GoogleGenerativeAIException; -} - -public final class com/google/ai/client/generativeai/type/HarmCategory : java/lang/Enum { - public static final field DANGEROUS_CONTENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HARASSMENT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field HATE_SPEECH Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field SEXUALLY_EXPLICIT Lcom/google/ai/client/generativeai/type/HarmCategory; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmCategory; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmCategory; -} - -public final class com/google/ai/client/generativeai/type/HarmProbability : java/lang/Enum { - public static final field HIGH Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field LOW Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field MEDIUM Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field NEGLIGIBLE Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNKNOWN Lcom/google/ai/client/generativeai/type/HarmProbability; - public static final field UNSPECIFIED Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun valueOf (Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/HarmProbability; - public static fun values ()[Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/ImagePart : com/google/ai/client/generativeai/type/Part { - public fun (Landroid/graphics/Bitmap;)V - public final fun getImage ()Landroid/graphics/Bitmap; -} - -public final class com/google/ai/client/generativeai/type/InvalidAPIKeyException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/InvalidStateException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/NoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun execute (Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function1; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/OneParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function2;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function2; - public final fun getParam ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public abstract interface class com/google/ai/client/generativeai/type/Part { -} - -public final class com/google/ai/client/generativeai/type/PartKt { - public static final fun asBlobPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/BlobPart; - public static final fun asFileDataPartOrNull (Lcom/google/ai/client/generativeai/type/Part;)Lcom/google/ai/client/generativeai/type/FileDataPart; - public static final fun asImageOrNull (Lcom/google/ai/client/generativeai/type/Part;)Landroid/graphics/Bitmap; - public static final fun asTextOrNull (Lcom/google/ai/client/generativeai/type/Part;)Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/PromptBlockedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/PromptFeedback { - public fun (Lcom/google/ai/client/generativeai/type/BlockReason;Ljava/util/List;)V - public final fun getBlockReason ()Lcom/google/ai/client/generativeai/type/BlockReason; - public final fun getSafetyRatings ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/QuotaExceededException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/RequestOptions { - public fun ()V - public synthetic fun (JLjava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public synthetic fun (JLjava/lang/String;Lkotlin/jvm/internal/DefaultConstructorMarker;)V - public fun (Ljava/lang/Long;)V - public fun (Ljava/lang/Long;Ljava/lang/String;)V - public synthetic fun (Ljava/lang/Long;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getApiVersion ()Ljava/lang/String; - public final fun getTimeout-UwyO8pc ()J -} - -public final class com/google/ai/client/generativeai/type/RequestTimeoutException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ResponseStoppedException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;)V - public synthetic fun (Lcom/google/ai/client/generativeai/type/GenerateContentResponse;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun getResponse ()Lcom/google/ai/client/generativeai/type/GenerateContentResponse; -} - -public final class com/google/ai/client/generativeai/type/SafetyRating { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/HarmProbability;)V - public final fun getCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getProbability ()Lcom/google/ai/client/generativeai/type/HarmProbability; -} - -public final class com/google/ai/client/generativeai/type/SafetySetting { - public fun (Lcom/google/ai/client/generativeai/type/HarmCategory;Lcom/google/ai/client/generativeai/type/BlockThreshold;)V - public final fun getHarmCategory ()Lcom/google/ai/client/generativeai/type/HarmCategory; - public final fun getThreshold ()Lcom/google/ai/client/generativeai/type/BlockThreshold; -} - -public final class com/google/ai/client/generativeai/type/Schema { - public static final field Companion Lcom/google/ai/client/generativeai/type/Schema$Companion; - public fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/Map;Ljava/util/List;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/FunctionType;ILkotlin/jvm/internal/DefaultConstructorMarker;)V - public final fun fromString (Ljava/lang/String;)Ljava/lang/Object; - public final fun getDescription ()Ljava/lang/String; - public final fun getEnum ()Ljava/util/List; - public final fun getFormat ()Ljava/lang/String; - public final fun getItems ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getName ()Ljava/lang/String; - public final fun getProperties ()Ljava/util/Map; - public final fun getRequired ()Ljava/util/List; - public final fun getType ()Lcom/google/ai/client/generativeai/type/FunctionType; -} - -public final class com/google/ai/client/generativeai/type/Schema$Companion { - public final fun arr (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun bool (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun enum (Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun int (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun num (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun obj (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; - public final fun str (Ljava/lang/String;Ljava/lang/String;)Lcom/google/ai/client/generativeai/type/Schema; -} - -public final class com/google/ai/client/generativeai/type/SerializationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/ServerException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/TextPart : com/google/ai/client/generativeai/type/Part { - public fun (Ljava/lang/String;)V - public final fun getText ()Ljava/lang/String; -} - -public final class com/google/ai/client/generativeai/type/ThreeParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function4;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function4; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam3 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/Tool { - public fun (Ljava/util/List;)V - public final fun getFunctionDeclarations ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/ToolConfig { - public static final field Companion Lcom/google/ai/client/generativeai/type/ToolConfig$Companion; - public fun (Lcom/google/ai/client/generativeai/type/FunctionCallingConfig;)V - public final fun getFunctionCallingConfig ()Lcom/google/ai/client/generativeai/type/FunctionCallingConfig; -} - -public final class com/google/ai/client/generativeai/type/ToolConfig$Companion { - public final fun always ()Lcom/google/ai/client/generativeai/type/ToolConfig; - public final fun never ()Lcom/google/ai/client/generativeai/type/ToolConfig; -} - -public final class com/google/ai/client/generativeai/type/TwoParameterFunction : com/google/ai/client/generativeai/type/FunctionDeclaration { - public fun (Ljava/lang/String;Ljava/lang/String;Lcom/google/ai/client/generativeai/type/Schema;Lcom/google/ai/client/generativeai/type/Schema;Lkotlin/jvm/functions/Function3;)V - public fun execute (Lcom/google/ai/client/generativeai/type/FunctionCallPart;Lkotlin/coroutines/Continuation;)Ljava/lang/Object; - public final fun getFunction ()Lkotlin/jvm/functions/Function3; - public final fun getParam1 ()Lcom/google/ai/client/generativeai/type/Schema; - public final fun getParam2 ()Lcom/google/ai/client/generativeai/type/Schema; - public fun getParameters ()Ljava/util/List; -} - -public final class com/google/ai/client/generativeai/type/UnknownException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun (Ljava/lang/String;Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/UnsupportedUserLocationException : com/google/ai/client/generativeai/type/GoogleGenerativeAIException { - public fun ()V - public fun (Ljava/lang/Throwable;)V - public synthetic fun (Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V -} - -public final class com/google/ai/client/generativeai/type/UsageMetadata { - public fun (III)V - public final fun getCandidatesTokenCount ()I - public final fun getPromptTokenCount ()I - public final fun getTotalTokenCount ()I -} - diff --git a/build.gradle.kts b/build.gradle.kts index 348fc881..9025f7ba 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2023 Google LLC + * Copyright 2024 Shreyas Patil * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,16 +15,32 @@ */ plugins { - id("com.android.library") version "8.1.3" apply false - id("org.jetbrains.dokka") version "1.8.20" apply false - kotlin("android") version "1.8.22" apply false - kotlin("plugin.serialization") version "1.8.22" apply false - id("com.ncorti.ktfmt.gradle") version "0.16.0" apply false - id("license-plugin") - id("multi-project-plugin") + //trick: for the same plugin versions in all sub-modules + alias(libs.plugins.androidLibrary).apply(false) + alias(libs.plugins.kotlinMultiplatform).apply(false) + id("org.jetbrains.dokka") version "1.9.10" apply false + kotlin("android") apply false + kotlin("plugin.serialization") version "1.9.0" apply false + alias(libs.plugins.spotless).apply(false) } -license { - template.set(file("licenses/APACHE-2.0")) - include.set(listOf("**/*.kt", "**/*.kts")) -} +subprojects { + apply(plugin = rootProject.libs.plugins.spotless.get().pluginId) + + configure { + kotlin { + target("**/*.kt") + targetExclude("$buildDir/**/*.kt") + targetExclude("bin/**/*.kt") + ktlint().editorConfigOverride(mapOf( + "ktlint_standard_filename" to "disabled", + + )) + licenseHeaderFile(rootProject.file("licenses/APACHE-2.0")) + } + kotlinGradle { + target("**/*.gradle.kts") + ktlint() + } + } +} \ No newline at end of file diff --git a/common/build.gradle.kts b/common/build.gradle.kts index bd02f5fa..5a769558 100644 --- a/common/build.gradle.kts +++ b/common/build.gradle.kts @@ -1,5 +1,5 @@ /* - * Copyright 2024 Google LLC + * Copyright 2024 Shreyas Patil * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,21 +15,68 @@ */ plugins { - id("com.android.library") - id("maven-publish") - id("com.ncorti.ktfmt.gradle") - id("changelog-plugin") - id("release-plugin") - kotlin("android") + alias(libs.plugins.kotlinMultiplatform) + alias(libs.plugins.androidLibrary) kotlin("plugin.serialization") + alias(libs.plugins.mavenPublish) } -ktfmt { - googleStyle() +kotlin { + androidTarget { + compilations.all { + kotlinOptions { + jvmTarget = "17" + } + } + } + jvm() + js(IR) { + browser() + nodejs() + } + + listOf( + iosX64(), + iosArm64(), + iosSimulatorArm64(), + ).forEach { iosTarget -> + iosTarget.binaries.framework { + baseName = "common" + isStatic = true + } + } + + sourceSets { + commonMain.dependencies { + implementation(libs.ktor.client.core) + implementation(libs.ktor.client.content.negotiation) + implementation(libs.ktor.client.serialization.json) + implementation(libs.ktor.client.logging) + + implementation(libs.kotlinx.serialization.json) + + implementation(libs.kotlinx.coroutines.core) + } + androidMain.dependencies { + api(libs.ktor.client.okhttp) + } + jvmMain.dependencies { + api(libs.ktor.client.okhttp) + api(libs.slf4j.api) + } + iosMain.dependencies { + api(libs.ktor.client.darwin) + } + commonTest.dependencies { + implementation(libs.kotlin.test) + implementation(libs.kotest.assertions.core) + implementation(libs.kotest.assertions.json) + } + } } android { - namespace = "com.google.ai.client.generativeai.common" + namespace = "dev.shreyaspatil.ai.client.generativeai.common" compileSdk = 34 buildFeatures.buildConfig = true @@ -39,8 +86,6 @@ android { testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" consumerProguardFiles("consumer-rules.pro") - - buildConfigField("String", "VERSION_NAME", "\"${project.version.toString()}\"") } publishing { @@ -54,7 +99,7 @@ android { isMinifyEnabled = false proguardFiles( getDefaultProguardFile("proguard-android-optimize.txt"), - "proguard-rules.pro" + "proguard-rules.pro", ) } } @@ -62,65 +107,8 @@ android { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = "17" - } testOptions { unitTests.isReturnDefaultValues = true } } - -dependencies { - val ktorVersion = "2.3.2" - - implementation("io.ktor:ktor-client-okhttp:$ktorVersion") - implementation("io.ktor:ktor-client-core:$ktorVersion") - implementation("io.ktor:ktor-client-content-negotiation:$ktorVersion") - implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") - implementation("io.ktor:ktor-client-logging:$ktorVersion") - - implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.1") - implementation("androidx.core:core-ktx:1.12.0") - implementation("org.slf4j:slf4j-nop:2.0.9") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactive:1.7.3") - implementation("org.reactivestreams:reactive-streams:1.0.3") - - implementation("com.google.guava:listenablefuture:1.0") - implementation("androidx.concurrent:concurrent-futures:1.2.0-alpha02") - implementation("androidx.concurrent:concurrent-futures-ktx:1.2.0-alpha02") - testImplementation("junit:junit:4.13.2") - testImplementation("io.kotest:kotest-assertions-core:4.0.7") - testImplementation("io.kotest:kotest-assertions-jvm:4.0.7") - testImplementation("io.kotest:kotest-assertions-json:4.0.7") - testImplementation("io.ktor:ktor-client-mock:$ktorVersion") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") -} - -publishing { - publications { - register("release") { - groupId = "com.google.ai.client.generativeai" - artifactId = "common" - version = project.version.toString() - pom { - licenses { - license { - name = "The Apache License, Version 2.0" - url = "http://www.apache.org/licenses/LICENSE-2.0.txt" - } - } - } - afterEvaluate { - from(components["release"]) - } - } - } - repositories { - maven { - url = uri("${projectDir}/m2") - } - } -} diff --git a/common/gradle.properties b/common/gradle.properties index b31ef9ad..45057eb5 100644 --- a/common/gradle.properties +++ b/common/gradle.properties @@ -1 +1,2 @@ -version=0.4.0 +POM_ARTIFACT_ID=common +POM_NAME=Google Generative AI - Common \ No newline at end of file diff --git a/common/src/androidMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt b/common/src/androidMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt new file mode 100644 index 00000000..8cd181b2 --- /dev/null +++ b/common/src/androidMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt @@ -0,0 +1,10 @@ +package dev.shreyaspatil.ai.client.generativeai.common.util + +actual object Log { + actual fun w(tag: String, message: String) { + android.util.Log.w(tag, message) + } + actual fun e(tag: String, message: String, throwable: Throwable?) { + android.util.Log.e(tag, message, throwable) + } +} \ No newline at end of file diff --git a/common/src/main/AndroidManifest.xml b/common/src/commonMain/AndroidManifest.xml similarity index 100% rename from common/src/main/AndroidManifest.xml rename to common/src/commonMain/AndroidManifest.xml diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/APIController.kt similarity index 92% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/APIController.kt index d40d8cff..27c1b69b 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/APIController.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/APIController.kt @@ -14,15 +14,14 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common +package dev.shreyaspatil.ai.client.generativeai.common -import android.util.Log -import com.google.ai.client.generativeai.common.server.FinishReason -import com.google.ai.client.generativeai.common.util.decodeToFlow +import dev.shreyaspatil.ai.client.generativeai.common.server.FinishReason +import dev.shreyaspatil.ai.client.generativeai.common.util.Log +import dev.shreyaspatil.ai.client.generativeai.common.util.decodeToFlow import io.ktor.client.HttpClient import io.ktor.client.call.body import io.ktor.client.engine.HttpClientEngine -import io.ktor.client.engine.okhttp.OkHttp import io.ktor.client.plugins.HttpTimeout import io.ktor.client.plugins.contentnegotiation.ContentNegotiation import io.ktor.client.request.HttpRequestBuilder @@ -70,7 +69,7 @@ internal constructor( private val key: String, model: String, private val requestOptions: RequestOptions, - httpEngine: HttpClientEngine, + httpEngine: HttpClientEngine?, private val apiClient: String, private val headerProvider: HeaderProvider? ) { @@ -81,11 +80,11 @@ internal constructor( requestOptions: RequestOptions, apiClient: String, headerProvider: HeaderProvider? = null - ) : this(key, model, requestOptions, OkHttp.create(), apiClient, headerProvider) + ) : this(key, model, requestOptions, null, apiClient, headerProvider) private val model = fullModelName(model) - private val client = + private val client = if (httpEngine != null) { HttpClient(httpEngine) { install(HttpTimeout) { requestTimeoutMillis = requestOptions.timeout.inWholeMilliseconds @@ -93,6 +92,15 @@ internal constructor( } install(ContentNegotiation) { json(JSON) } } + } else { + HttpClient { + install(HttpTimeout) { + requestTimeoutMillis = requestOptions.timeout.inWholeMilliseconds + socketTimeoutMillis = 80_000 + } + install(ContentNegotiation) { json(JSON) } + } + } suspend fun generateContent(request: GenerateContentRequest): GenerateContentResponse = try { @@ -203,7 +211,7 @@ internal constructor( } companion object { - private val TAG = APIController::class.java.simpleName + private val TAG = "ApiController" } } diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Exceptions.kt similarity index 98% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Exceptions.kt index 491b8cb4..b047e29b 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Exceptions.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Exceptions.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common +package dev.shreyaspatil.ai.client.generativeai.common import io.ktor.serialization.JsonConvertException import kotlinx.coroutines.TimeoutCancellationException diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Request.kt similarity index 76% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Request.kt index 09171a15..1c80b127 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Request.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Request.kt @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common +package dev.shreyaspatil.ai.client.generativeai.common -import com.google.ai.client.generativeai.common.client.GenerationConfig -import com.google.ai.client.generativeai.common.client.Tool -import com.google.ai.client.generativeai.common.client.ToolConfig -import com.google.ai.client.generativeai.common.shared.Content -import com.google.ai.client.generativeai.common.shared.SafetySetting +import dev.shreyaspatil.ai.client.generativeai.common.client.GenerationConfig +import dev.shreyaspatil.ai.client.generativeai.common.client.Tool +import dev.shreyaspatil.ai.client.generativeai.common.client.ToolConfig +import dev.shreyaspatil.ai.client.generativeai.common.shared.Content +import dev.shreyaspatil.ai.client.generativeai.common.shared.SafetySetting import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable import kotlinx.serialization.Transient diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/RequestOptions.kt similarity index 95% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/RequestOptions.kt index b1da0e49..9d4fdc84 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/RequestOptions.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/RequestOptions.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common +package dev.shreyaspatil.ai.client.generativeai.common import io.ktor.client.plugins.HttpTimeout import kotlin.time.Duration @@ -33,7 +33,6 @@ class RequestOptions( val apiVersion: String = "v1beta", val endpoint: String = "https://generativelanguage.googleapis.com", ) { - @JvmOverloads constructor( timeout: Long? = HttpTimeout.INFINITE_TIMEOUT_MS, apiVersion: String = "v1beta", diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Response.kt similarity index 81% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Response.kt index e3885bfd..023432ba 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/Response.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/Response.kt @@ -14,11 +14,11 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common +package dev.shreyaspatil.ai.client.generativeai.common -import com.google.ai.client.generativeai.common.server.Candidate -import com.google.ai.client.generativeai.common.server.GRpcError -import com.google.ai.client.generativeai.common.server.PromptFeedback +import dev.shreyaspatil.ai.client.generativeai.common.server.Candidate +import dev.shreyaspatil.ai.client.generativeai.common.server.GRpcError +import dev.shreyaspatil.ai.client.generativeai.common.server.PromptFeedback import kotlinx.serialization.Serializable sealed interface Response diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/client/Types.kt similarity index 74% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/client/Types.kt index c3bff52b..137fdb47 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/client/Types.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/client/Types.kt @@ -14,8 +14,11 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common.client +package dev.shreyaspatil.ai.client.generativeai.common.client +import dev.shreyaspatil.ai.client.generativeai.common.util.SerializableEnum +import dev.shreyaspatil.ai.client.generativeai.common.util.enumSerializer +import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -38,12 +41,12 @@ data class ToolConfig( @Serializable data class FunctionCallingConfig(val mode: Mode) { - @Serializable - enum class Mode { - @SerialName("MODE_UNSPECIFIED") UNSPECIFIED, - AUTO, - ANY, - NONE + @Serializable(ModeSerializer::class) + enum class Mode(override val serialName: String): SerializableEnum { + UNSPECIFIED("MODE_UNSPECIFIED"), + AUTO("AUTO"), + ANY("ANY"), + NONE("NONE") } } @@ -64,3 +67,7 @@ data class Schema( val required: List? = null, val items: Schema? = null, ) + + +internal object ModeSerializer : + KSerializer by enumSerializer(FunctionCallingConfig.Mode.entries) \ No newline at end of file diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/server/Types.kt similarity index 65% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/server/Types.kt index c7649153..350c5818 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/server/Types.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/server/Types.kt @@ -14,11 +14,12 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common.server +package dev.shreyaspatil.ai.client.generativeai.common.server -import com.google.ai.client.generativeai.common.shared.Content -import com.google.ai.client.generativeai.common.shared.HarmCategory -import com.google.ai.client.generativeai.common.util.FirstOrdinalSerializer +import dev.shreyaspatil.ai.client.generativeai.common.shared.Content +import dev.shreyaspatil.ai.client.generativeai.common.shared.HarmCategory +import dev.shreyaspatil.ai.client.generativeai.common.util.SerializableEnum +import dev.shreyaspatil.ai.client.generativeai.common.util.enumSerializer import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.KSerializer import kotlinx.serialization.SerialName @@ -26,13 +27,13 @@ import kotlinx.serialization.Serializable import kotlinx.serialization.json.JsonNames object BlockReasonSerializer : - KSerializer by FirstOrdinalSerializer(BlockReason::class) + KSerializer by enumSerializer(BlockReason.entries) object HarmProbabilitySerializer : - KSerializer by FirstOrdinalSerializer(HarmProbability::class) + KSerializer by enumSerializer(HarmProbability.entries) object FinishReasonSerializer : - KSerializer by FirstOrdinalSerializer(FinishReason::class) + KSerializer by enumSerializer(FinishReason.entries) @Serializable data class PromptFeedback( @@ -41,11 +42,11 @@ data class PromptFeedback( ) @Serializable(BlockReasonSerializer::class) -enum class BlockReason { - UNKNOWN, - @SerialName("BLOCKED_REASON_UNSPECIFIED") UNSPECIFIED, - SAFETY, - OTHER +enum class BlockReason(override val serialName: String): SerializableEnum { + UNKNOWN("UNKNOWN"), + UNSPECIFIED("BLOCKED_REASON_UNSPECIFIED"), + SAFETY("SAFETY"), + OTHER("OTHER") } @Serializable @@ -80,13 +81,13 @@ data class SafetyRating( ) @Serializable(HarmProbabilitySerializer::class) -enum class HarmProbability { - UNKNOWN, - @SerialName("HARM_PROBABILITY_UNSPECIFIED") UNSPECIFIED, - NEGLIGIBLE, - LOW, - MEDIUM, - HIGH +enum class HarmProbability(override val serialName: String): SerializableEnum { + UNKNOWN("UNKNOWN"), + UNSPECIFIED("HARM_PROBABILITY_UNSPECIFIED"), + NEGLIGIBLE("NEGLIGIBLE"), + LOW("LOW"), + MEDIUM("MEDIUM"), + HIGH("HIGH") } @Serializable @@ -100,14 +101,14 @@ enum class HarmSeverity { } @Serializable(FinishReasonSerializer::class) -enum class FinishReason { - UNKNOWN, - @SerialName("FINISH_REASON_UNSPECIFIED") UNSPECIFIED, - STOP, - MAX_TOKENS, - SAFETY, - RECITATION, - OTHER +enum class FinishReason(override val serialName: String): SerializableEnum { + UNKNOWN("UNKNOWN"), + UNSPECIFIED("FINISH_REASON_UNSPECIFIED"), + STOP("STOP"), + MAX_TOKENS("MAX_TOKENS"), + SAFETY("SAFETY"), + RECITATION("RECITATION"), + OTHER("OTHER") } @Serializable diff --git a/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/shared/Types.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/shared/Types.kt new file mode 100644 index 00000000..510aade7 --- /dev/null +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/shared/Types.kt @@ -0,0 +1,112 @@ +/* + * Copyright 2024 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package dev.shreyaspatil.ai.client.generativeai.common.shared + +import dev.shreyaspatil.ai.client.generativeai.common.util.SerializableEnum +import dev.shreyaspatil.ai.client.generativeai.common.util.enumSerializer +import kotlinx.serialization.DeserializationStrategy +import kotlinx.serialization.EncodeDefault +import kotlinx.serialization.ExperimentalSerializationApi +import kotlinx.serialization.KSerializer +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable +import kotlinx.serialization.SerializationException +import kotlinx.serialization.json.JsonContentPolymorphicSerializer +import kotlinx.serialization.json.JsonElement +import kotlinx.serialization.json.JsonObject +import kotlinx.serialization.json.jsonObject + +object HarmCategorySerializer : + KSerializer by enumSerializer(HarmCategory.entries) + +@Serializable(HarmCategorySerializer::class) +enum class HarmCategory(override val serialName: String) : SerializableEnum { + UNKNOWN("UNKNOWN"), + HARASSMENT("HARM_CATEGORY_HARASSMENT"), + HATE_SPEECH("HARM_CATEGORY_HATE_SPEECH"), + SEXUALLY_EXPLICIT("HARM_CATEGORY_SEXUALLY_EXPLICIT"), + DANGEROUS_CONTENT("HARM_CATEGORY_DANGEROUS_CONTENT") +} + +typealias Base64 = String + +@ExperimentalSerializationApi +@Serializable +data class Content(@EncodeDefault val role: String? = "user", val parts: List) + +@Serializable(PartSerializer::class) +sealed interface Part + +@Serializable +data class TextPart(val text: String) : Part + +@Serializable +data class BlobPart(@SerialName("inline_data") val inlineData: Blob) : Part + +@Serializable +data class FunctionCallPart(val functionCall: FunctionCall) : Part + +@Serializable +data class FunctionResponsePart(val functionResponse: FunctionResponse) : Part + +@Serializable +data class FunctionResponse(val name: String, val response: JsonObject) + +@Serializable +data class FunctionCall(val name: String, val args: Map) + +@Serializable +data class FileDataPart(@SerialName("file_data") val fileData: FileData) : Part + +@Serializable +data class FileData( + @SerialName("mime_type") val mimeType: String, + @SerialName("file_uri") val fileUri: String +) + +@Serializable +data class Blob( + @SerialName("mime_type") val mimeType: String, + val data: Base64, +) + +@Serializable +data class SafetySetting(val category: HarmCategory, val threshold: HarmBlockThreshold) + +@Serializable +enum class HarmBlockThreshold { + @SerialName("HARM_BLOCK_THRESHOLD_UNSPECIFIED") + UNSPECIFIED, + BLOCK_LOW_AND_ABOVE, + BLOCK_MEDIUM_AND_ABOVE, + BLOCK_ONLY_HIGH, + BLOCK_NONE, +} + +object PartSerializer : JsonContentPolymorphicSerializer(Part::class) { + override fun selectDeserializer(element: JsonElement): DeserializationStrategy { + val jsonObject = element.jsonObject + return when { + "text" in jsonObject -> TextPart.serializer() + "functionCall" in jsonObject -> FunctionCallPart.serializer() + "functionResponse" in jsonObject -> FunctionResponsePart.serializer() + "inline_data" in jsonObject -> BlobPart.serializer() + "file_data" in jsonObject -> FileDataPart.serializer() + else -> throw SerializationException("Unknown Part type") + } + } +} diff --git a/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt new file mode 100644 index 00000000..23923cf7 --- /dev/null +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt @@ -0,0 +1,6 @@ +package dev.shreyaspatil.ai.client.generativeai.common.util + +expect object Log { + fun w(tag: String, message: String) + fun e(tag: String, message: String, throwable: Throwable? = null) +} \ No newline at end of file diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/kotlin.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/kotlin.kt similarity index 63% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/util/kotlin.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/kotlin.kt index 8f681542..190e6834 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/kotlin.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/kotlin.kt @@ -14,9 +14,7 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common.util - -import java.lang.reflect.Field +package dev.shreyaspatil.ai.client.generativeai.common.util /** * Removes the last character from the [StringBuilder]. @@ -26,16 +24,10 @@ import java.lang.reflect.Field * @return The [StringBuilder] used to make the call, for optional chaining. * @throws IndexOutOfBoundsException if the StringBuilder is empty. */ -internal fun StringBuilder.removeLast(): StringBuilder = - if (isEmpty()) throw IndexOutOfBoundsException("StringBuilder is empty.") - else deleteCharAt(length - 1) - -/** - * A variant of [getAnnotation][Field.getAnnotation] that provides implicit Kotlin support. - * - * Syntax sugar for: - * ``` - * getAnnotation(T::class.java) - * ``` - */ -internal inline fun Field.getAnnotation() = getAnnotation(T::class.java) +internal fun StringBuilder.removeLast(): StringBuilder { + if (this.isEmpty()) throw IndexOutOfBoundsException("StringBuilder is empty.") + else { + val result = this.toString().dropLast(1) + return StringBuilder(result) + } +} diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/ktor.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/ktor.kt similarity index 98% rename from common/src/main/kotlin/com/google/ai/client/generativeai/common/util/ktor.kt rename to common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/ktor.kt index 04eb18dc..ce427ca7 100644 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/ktor.kt +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/ktor.kt @@ -16,7 +16,7 @@ @file:Suppress("DEPRECATION") // a replacement for our purposes has not been published yet -package com.google.ai.client.generativeai.common.util +package dev.shreyaspatil.ai.client.generativeai.common.util import io.ktor.utils.io.ByteChannel import io.ktor.utils.io.ByteReadChannel diff --git a/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/serialization.kt b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/serialization.kt new file mode 100644 index 00000000..186064be --- /dev/null +++ b/common/src/commonMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/serialization.kt @@ -0,0 +1,86 @@ +/* + * Copyright 2024 Shreyas Patil + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package dev.shreyaspatil.ai.client.generativeai.common.util + +/* + * Copyright 2024 Shreyas Patil + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import kotlinx.serialization.KSerializer +import kotlinx.serialization.descriptors.SerialDescriptor +import kotlinx.serialization.descriptors.buildClassSerialDescriptor +import kotlinx.serialization.encoding.Decoder +import kotlinx.serialization.encoding.Encoder +import kotlin.enums.EnumEntries + +interface SerializableEnum> { + val serialName: String + get() = "UNKNOWN" +} + +/** + * Serializer for enums that defaults to the first ordinal on unknown types. + * + * Convention is that the first enum be named `UNKNOWN`, but any name is valid. + * + * When an unknown enum value is found, the enum itself will be logged to stderr with a message + * about opening an issue on GitHub regarding the new enum value. + */ +internal fun enumSerializer( + enumValues: EnumEntries, +) where + T : SerializableEnum, + T : Enum = + object : KSerializer { + override val descriptor: SerialDescriptor = buildClassSerialDescriptor("FirstOrdinalSerializer") + + override fun deserialize(decoder: Decoder): T { + val name = decoder.decodeString() + + return enumValues.firstOrNull { it.serialName == name } + ?: enumValues.first().also { printWarning(name) } + } + + private fun printWarning(name: String) { + Log.e( + "EnumSerializer", + """ + |Unknown enum value found: $name" + |This usually means the backend was updated, and the SDK needs to be updated to match it. + |Check if there's a new version for the SDK, otherwise please open an issue on our + |GitHub to bring it to our attention: + |https://github.com/google/google-ai-android + """ + .trimMargin(), + ) + } + + override fun serialize(encoder: Encoder, value: T) { + encoder.encodeString(value.serialName) + } + } diff --git a/common/src/iosMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt b/common/src/iosMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt new file mode 100644 index 00000000..ba8871e7 --- /dev/null +++ b/common/src/iosMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt @@ -0,0 +1,11 @@ +package dev.shreyaspatil.ai.client.generativeai.common.util + +actual object Log { + actual fun w(tag: String, message: String) { + println("[$tag] $message") + } + actual fun e(tag: String, message: String, throwable: Throwable?) { + println("[$tag] $message") + throwable?.printStackTrace() + } +} \ No newline at end of file diff --git a/common/src/jsMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt b/common/src/jsMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt new file mode 100644 index 00000000..ba8871e7 --- /dev/null +++ b/common/src/jsMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt @@ -0,0 +1,11 @@ +package dev.shreyaspatil.ai.client.generativeai.common.util + +actual object Log { + actual fun w(tag: String, message: String) { + println("[$tag] $message") + } + actual fun e(tag: String, message: String, throwable: Throwable?) { + println("[$tag] $message") + throwable?.printStackTrace() + } +} \ No newline at end of file diff --git a/common/src/jvmMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt b/common/src/jvmMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt new file mode 100644 index 00000000..768da8d9 --- /dev/null +++ b/common/src/jvmMain/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/Log.kt @@ -0,0 +1,15 @@ +package dev.shreyaspatil.ai.client.generativeai.common.util + +import org.slf4j.LoggerFactory + +actual object Log { + private val logger = LoggerFactory.getLogger("GenerativeAI") + + actual fun w(tag: String, message: String) { + logger.warn("[$tag] $message") + } + + actual fun e(tag: String, message: String, throwable: Throwable?) { + logger.error("[$tag] $message", throwable) + } +} diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt deleted file mode 100644 index d10bdf36..00000000 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/shared/Types.kt +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.client.generativeai.common.shared - -import com.google.ai.client.generativeai.common.util.FirstOrdinalSerializer -import kotlinx.serialization.DeserializationStrategy -import kotlinx.serialization.EncodeDefault -import kotlinx.serialization.ExperimentalSerializationApi -import kotlinx.serialization.KSerializer -import kotlinx.serialization.SerialName -import kotlinx.serialization.Serializable -import kotlinx.serialization.SerializationException -import kotlinx.serialization.json.JsonContentPolymorphicSerializer -import kotlinx.serialization.json.JsonElement -import kotlinx.serialization.json.JsonObject -import kotlinx.serialization.json.jsonObject - -object HarmCategorySerializer : - KSerializer by FirstOrdinalSerializer(HarmCategory::class) - -@Serializable(HarmCategorySerializer::class) -enum class HarmCategory { - UNKNOWN, - @SerialName("HARM_CATEGORY_HARASSMENT") HARASSMENT, - @SerialName("HARM_CATEGORY_HATE_SPEECH") HATE_SPEECH, - @SerialName("HARM_CATEGORY_SEXUALLY_EXPLICIT") SEXUALLY_EXPLICIT, - @SerialName("HARM_CATEGORY_DANGEROUS_CONTENT") DANGEROUS_CONTENT -} - -typealias Base64 = String - -@ExperimentalSerializationApi -@Serializable -data class Content(@EncodeDefault val role: String? = "user", val parts: List) - -@Serializable(PartSerializer::class) sealed interface Part - -@Serializable data class TextPart(val text: String) : Part - -@Serializable data class BlobPart(@SerialName("inline_data") val inlineData: Blob) : Part - -@Serializable data class FunctionCallPart(val functionCall: FunctionCall) : Part - -@Serializable data class FunctionResponsePart(val functionResponse: FunctionResponse) : Part - -@Serializable data class FunctionResponse(val name: String, val response: JsonObject) - -@Serializable data class FunctionCall(val name: String, val args: Map) - -@Serializable data class FileDataPart(@SerialName("file_data") val fileData: FileData) : Part - -@Serializable -data class FileData( - @SerialName("mime_type") val mimeType: String, - @SerialName("file_uri") val fileUri: String -) - -@Serializable -data class Blob( - @SerialName("mime_type") val mimeType: String, - val data: Base64, -) - -@Serializable -data class SafetySetting(val category: HarmCategory, val threshold: HarmBlockThreshold) - -@Serializable -enum class HarmBlockThreshold { - @SerialName("HARM_BLOCK_THRESHOLD_UNSPECIFIED") UNSPECIFIED, - BLOCK_LOW_AND_ABOVE, - BLOCK_MEDIUM_AND_ABOVE, - BLOCK_ONLY_HIGH, - BLOCK_NONE, -} - -object PartSerializer : JsonContentPolymorphicSerializer(Part::class) { - override fun selectDeserializer(element: JsonElement): DeserializationStrategy { - val jsonObject = element.jsonObject - return when { - "text" in jsonObject -> TextPart.serializer() - "functionCall" in jsonObject -> FunctionCallPart.serializer() - "functionResponse" in jsonObject -> FunctionResponsePart.serializer() - "inline_data" in jsonObject -> BlobPart.serializer() - "file_data" in jsonObject -> FileDataPart.serializer() - else -> throw SerializationException("Unknown Part type") - } - } -} diff --git a/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/serialization.kt b/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/serialization.kt deleted file mode 100644 index d818c266..00000000 --- a/common/src/main/kotlin/com/google/ai/client/generativeai/common/util/serialization.kt +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright 2024 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.client.generativeai.common.util - -import android.util.Log -import com.google.ai.client.generativeai.common.SerializationException -import kotlin.reflect.KClass -import kotlinx.serialization.KSerializer -import kotlinx.serialization.SerialName -import kotlinx.serialization.descriptors.SerialDescriptor -import kotlinx.serialization.descriptors.buildClassSerialDescriptor -import kotlinx.serialization.encoding.Decoder -import kotlinx.serialization.encoding.Encoder - -/** - * Serializer for enums that defaults to the first ordinal on unknown types. - * - * Convention is that the first enum be named `UNKNOWN`, but any name is valid. - * - * When an unknown enum value is found, the enum itself will be logged to stderr with a message - * about opening an issue on GitHub regarding the new enum value. - */ -class FirstOrdinalSerializer>(private val enumClass: KClass) : KSerializer { - override val descriptor: SerialDescriptor = buildClassSerialDescriptor("FirstOrdinalSerializer") - - override fun deserialize(decoder: Decoder): T { - val name = decoder.decodeString() - val values = enumClass.enumValues() - - return values.firstOrNull { it.serialName == name } - ?: values.first().also { printWarning(name) } - } - - private fun printWarning(name: String) { - Log.e( - "FirstOrdinalSerializer", - """ - |Unknown enum value found: $name" - |This usually means the backend was updated, and the SDK needs to be updated to match it. - |Check if there's a new version for the SDK, otherwise please open an issue on our - |GitHub to bring it to our attention: - |https://github.com/google/google-ai-android - """ - .trimMargin() - ) - } - - override fun serialize(encoder: Encoder, value: T) { - encoder.encodeString(value.serialName) - } -} - -/** - * Provides the name to be used in serialization for this enum value. - * - * By default an enum is serialized to its [name][Enum.name], and can be overwritten by providing a - * [SerialName] annotation. - */ -val > T.serialName: String - get() = declaringJavaClass.getField(name).getAnnotation()?.value ?: name - -/** - * Variant of [kotlin.enumValues] that provides support for [KClass] instances of enums. - * - * @throws SerializationException if the class is not a valid enum. Beyond runtime emily magic, this - * shouldn't really be possible. - */ -fun > KClass.enumValues(): Array = - java.enumConstants ?: throw SerializationException("$simpleName is not a valid enum type.") diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/APIControllerTests.kt similarity index 94% rename from common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt rename to common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/APIControllerTests.kt index e0f8bb71..16557fe0 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/APIControllerTests.kt +++ b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/APIControllerTests.kt @@ -14,16 +14,16 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common - -import com.google.ai.client.generativeai.common.client.FunctionCallingConfig -import com.google.ai.client.generativeai.common.client.ToolConfig -import com.google.ai.client.generativeai.common.shared.Content -import com.google.ai.client.generativeai.common.shared.TextPart -import com.google.ai.client.generativeai.common.util.commonTest -import com.google.ai.client.generativeai.common.util.createResponses -import com.google.ai.client.generativeai.common.util.doBlocking -import com.google.ai.client.generativeai.common.util.prepareStreamingResponse +package dev.shreyaspatil.ai.client.generativeai.common + +import dev.shreyaspatil.ai.client.generativeai.common.client.FunctionCallingConfig +import dev.shreyaspatil.ai.client.generativeai.common.client.ToolConfig +import dev.shreyaspatil.ai.client.generativeai.common.shared.Content +import dev.shreyaspatil.ai.client.generativeai.common.shared.TextPart +import dev.shreyaspatil.ai.client.generativeai.common.util.commonTest +import dev.shreyaspatil.ai.client.generativeai.common.util.createResponses +import dev.shreyaspatil.ai.client.generativeai.common.util.doBlocking +import dev.shreyaspatil.ai.client.generativeai.common.util.prepareStreamingResponse import io.kotest.assertions.json.shouldContainJsonKey import io.kotest.assertions.json.shouldNotContainJsonKey import io.kotest.assertions.throwables.shouldThrow @@ -94,7 +94,7 @@ internal class RequestFormatTests { "gemini-pro-1.0", RequestOptions(), mockEngine, - "genai-android/${BuildConfig.VERSION_NAME}", + "genai-android/test", null ) diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/StreamingSnapshotTests.kt b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/StreamingSnapshotTests.kt similarity index 94% rename from common/src/test/java/com/google/ai/client/generativeai/common/StreamingSnapshotTests.kt rename to common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/StreamingSnapshotTests.kt index 7f151320..2ba348fe 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/StreamingSnapshotTests.kt +++ b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/StreamingSnapshotTests.kt @@ -14,13 +14,13 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common +package dev.shreyaspatil.ai.client.generativeai.common -import com.google.ai.client.generativeai.common.server.BlockReason -import com.google.ai.client.generativeai.common.server.FinishReason -import com.google.ai.client.generativeai.common.shared.HarmCategory -import com.google.ai.client.generativeai.common.shared.TextPart -import com.google.ai.client.generativeai.common.util.goldenStreamingFile +import dev.shreyaspatil.ai.client.generativeai.common.server.BlockReason +import dev.shreyaspatil.ai.client.generativeai.common.server.FinishReason +import dev.shreyaspatil.ai.client.generativeai.common.shared.HarmCategory +import dev.shreyaspatil.ai.client.generativeai.common.shared.TextPart +import dev.shreyaspatil.ai.client.generativeai.common.util.goldenStreamingFile import io.kotest.assertions.throwables.shouldThrow import io.kotest.matchers.nulls.shouldNotBeNull import io.kotest.matchers.shouldBe diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/UnarySnapshotTests.kt similarity index 94% rename from common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt rename to common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/UnarySnapshotTests.kt index cea9d0a8..609de610 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/UnarySnapshotTests.kt +++ b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/UnarySnapshotTests.kt @@ -14,14 +14,14 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common - -import com.google.ai.client.generativeai.common.server.BlockReason -import com.google.ai.client.generativeai.common.server.FinishReason -import com.google.ai.client.generativeai.common.server.HarmProbability -import com.google.ai.client.generativeai.common.server.HarmSeverity -import com.google.ai.client.generativeai.common.shared.HarmCategory -import com.google.ai.client.generativeai.common.util.goldenUnaryFile +package dev.shreyaspatil.ai.client.generativeai.common + +import dev.shreyaspatil.ai.client.generativeai.common.server.BlockReason +import dev.shreyaspatil.ai.client.generativeai.common.server.FinishReason +import dev.shreyaspatil.ai.client.generativeai.common.server.HarmProbability +import dev.shreyaspatil.ai.client.generativeai.common.server.HarmSeverity +import dev.shreyaspatil.ai.client.generativeai.common.shared.HarmCategory +import dev.shreyaspatil.ai.client.generativeai.common.util.goldenUnaryFile import io.kotest.assertions.throwables.shouldThrow import io.kotest.matchers.should import io.kotest.matchers.shouldBe diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/util/kotlin.kt b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/kotlin.kt similarity index 95% rename from common/src/test/java/com/google/ai/client/generativeai/common/util/kotlin.kt rename to common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/kotlin.kt index c7ebf102..7626924c 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/util/kotlin.kt +++ b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/kotlin.kt @@ -14,7 +14,7 @@ * limitations under the License. */ -package com.google.ai.client.generativeai.common.util +package dev.shreyaspatil.ai.client.generativeai.common.util import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.runBlocking diff --git a/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/tests.kt similarity index 90% rename from common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt rename to common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/tests.kt index 4adee54c..fcdd5a12 100644 --- a/common/src/test/java/com/google/ai/client/generativeai/common/util/tests.kt +++ b/common/src/test/kotlin/dev/shreyaspatil/ai/client/generativeai/common/util/tests.kt @@ -16,16 +16,16 @@ @file:Suppress("DEPRECATION") // a replacement for our purposes has not been published yet -package com.google.ai.client.generativeai.common.util - -import com.google.ai.client.generativeai.common.APIController -import com.google.ai.client.generativeai.common.GenerateContentRequest -import com.google.ai.client.generativeai.common.GenerateContentResponse -import com.google.ai.client.generativeai.common.JSON -import com.google.ai.client.generativeai.common.RequestOptions -import com.google.ai.client.generativeai.common.server.Candidate -import com.google.ai.client.generativeai.common.shared.Content -import com.google.ai.client.generativeai.common.shared.TextPart +package dev.shreyaspatil.ai.client.generativeai.common.util + +import dev.shreyaspatil.ai.client.generativeai.common.APIController +import dev.shreyaspatil.ai.client.generativeai.common.GenerateContentRequest +import dev.shreyaspatil.ai.client.generativeai.common.GenerateContentResponse +import dev.shreyaspatil.ai.client.generativeai.common.JSON +import dev.shreyaspatil.ai.client.generativeai.common.RequestOptions +import dev.shreyaspatil.ai.client.generativeai.common.server.Candidate +import dev.shreyaspatil.ai.client.generativeai.common.shared.Content +import dev.shreyaspatil.ai.client.generativeai.common.shared.TextPart import io.ktor.client.engine.mock.MockEngine import io.ktor.client.engine.mock.respond import io.ktor.http.HttpHeaders diff --git a/generativeai-android-sample/.google/packaging.yaml b/generativeai-android-sample/.google/packaging.yaml deleted file mode 100644 index c1e03664..00000000 --- a/generativeai-android-sample/.google/packaging.yaml +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2023 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# GOOGLE SAMPLE PACKAGING DATA -# -# This file is used by Google as part of our samples packaging process. -# End users may safely ignore this file. It has no relevance to other systems. ---- -status: PUBLISHED -technologies: [Android, AI, JetpackCompose] -categories: - - Artificial Intelligence - - Machine Learning - - Jetpack Compose Layouts -languages: [Kotlin] -solutions: - - Mobile -github: google/generative-ai-android -level: INTERMEDIATE -apiRefs: - - android:androidx.compose.Composable -license: apache2 diff --git a/generativeai-android-sample/README.md b/generativeai-android-sample/README.md deleted file mode 100644 index 870a8b55..00000000 --- a/generativeai-android-sample/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Google Generative AI Sample for Android (Kotlin) - -This Android sample app demonstrates how to use state-of-the-art -generative AI models (like Gemini) to build AI-powered features and applications. - -To try out this sample app, you need to use latest stable version of Android Studio. -However, if you want to latest lint checks and AI productivity features in Android -Studio use the latest preview version of [Android Studio](https://developer.android.com/studio/preview). - -You can clone this repository or import the project from Android Studio following the steps -[here](https://developer.android.com/jetpack/compose/setup#sample). - -## Screenshots - -Screenshot - -## Requirements - -1. Follow the instructions on Google AI Studio [setup page](https://makersuite.google.com/app/apikey) to obtain an API key. -2. Add your API Key to the `local.properties` file in this format - -```txt -apiKey=YOUR_API_KEY -``` -## Features - -This sample showcases the following API capablilites: -* Generate Text - demonstrates the Text feature from the SDK -* Photo Reasoning - demonstrates the MultiModal feature from the SDK -* Chat - demonstrates the Multi-turn Conversations feature from the SDK - -## Documentation - -You can find the quick start documentation for the Android Generative AI API [here](https://ai.google.dev/tutorials/android_quickstart). diff --git a/generativeai-android-sample/app/build.gradle.kts b/generativeai-android-sample/app/build.gradle.kts deleted file mode 100644 index 880d8e83..00000000 --- a/generativeai-android-sample/app/build.gradle.kts +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -plugins { - id("com.android.application") - id("org.jetbrains.kotlin.android") - id("com.google.android.libraries.mapsplatform.secrets-gradle-plugin") -} - -android { - namespace = "com.google.ai.sample" - compileSdk = 34 - - defaultConfig { - applicationId = "com.google.ai.sample" - minSdk = 26 - targetSdk = 34 - versionCode = 1 - versionName = "1.0" - - testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" - vectorDrawables { - useSupportLibrary = true - } - } - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 - } - kotlinOptions { - jvmTarget = "1.8" - } - buildFeatures { - compose = true - } - composeOptions { - kotlinCompilerExtensionVersion = "1.5.4" - } -} - -dependencies { - implementation("androidx.core:core-ktx:1.9.0") - implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2") - implementation("androidx.lifecycle:lifecycle-viewmodel-compose:2.6.2") - implementation("androidx.activity:activity-compose:1.8.1") - implementation("androidx.navigation:navigation-compose:2.7.5") - - implementation(platform("androidx.compose:compose-bom:2023.10.01")) - implementation("androidx.compose.ui:ui") - implementation("androidx.compose.ui:ui-graphics") - implementation("androidx.compose.ui:ui-tooling-preview") - implementation("androidx.compose.material3:material3") - - implementation("io.coil-kt:coil-compose:2.5.0") - - testImplementation("junit:junit:4.13.2") - androidTestImplementation("androidx.test.ext:junit:1.1.5") - androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1") - androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00")) - androidTestImplementation("androidx.compose.ui:ui-test-junit4") - debugImplementation("androidx.compose.ui:ui-tooling") - debugImplementation("androidx.compose.ui:ui-test-manifest") - - implementation("com.google.ai.client.generativeai:generativeai:0.3.0") -} diff --git a/generativeai-android-sample/app/src/main/AndroidManifest.xml b/generativeai-android-sample/app/src/main/AndroidManifest.xml deleted file mode 100644 index 0d795b20..00000000 --- a/generativeai-android-sample/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt deleted file mode 100644 index ff0b98d4..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/GenerativeAiViewModelFactory.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample - -import androidx.lifecycle.ViewModel -import androidx.lifecycle.ViewModelProvider -import androidx.lifecycle.viewmodel.CreationExtras -import com.google.ai.client.generativeai.GenerativeModel -import com.google.ai.client.generativeai.type.generationConfig -import com.google.ai.sample.feature.chat.ChatViewModel -import com.google.ai.sample.feature.multimodal.PhotoReasoningViewModel -import com.google.ai.sample.feature.text.SummarizeViewModel - -val GenerativeViewModelFactory = object : ViewModelProvider.Factory { - override fun create( - viewModelClass: Class, - extras: CreationExtras - ): T { - val config = generationConfig { - temperature = 0.7f - } - - return with(viewModelClass) { - when { - isAssignableFrom(SummarizeViewModel::class.java) -> { - // Initialize a GenerativeModel with the `gemini-pro` AI model - // for text generation - val generativeModel = GenerativeModel( - modelName = "gemini-1.0-pro", - apiKey = BuildConfig.apiKey, - generationConfig = config - ) - SummarizeViewModel(generativeModel) - } - - isAssignableFrom(PhotoReasoningViewModel::class.java) -> { - // Initialize a GenerativeModel with the `gemini-pro-vision` AI model - // for multimodal text generation - val generativeModel = GenerativeModel( - modelName = "gemini-1.0-pro-vision-latest", - apiKey = BuildConfig.apiKey, - generationConfig = config - ) - PhotoReasoningViewModel(generativeModel) - } - - isAssignableFrom(ChatViewModel::class.java) -> { - // Initialize a GenerativeModel with the `gemini-pro` AI model for chat - val generativeModel = GenerativeModel( - modelName = "gemini-1.0-pro", - apiKey = BuildConfig.apiKey, - generationConfig = config - ) - ChatViewModel(generativeModel) - } - - else -> - throw IllegalArgumentException("Unknown ViewModel class: ${viewModelClass.name}") - } - } as T - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MainActivity.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MainActivity.kt deleted file mode 100644 index 67ebf68d..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MainActivity.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample - -import android.os.Bundle -import androidx.activity.ComponentActivity -import androidx.activity.compose.setContent -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Surface -import androidx.compose.ui.Modifier -import androidx.navigation.compose.NavHost -import androidx.navigation.compose.composable -import androidx.navigation.compose.rememberNavController -import com.google.ai.sample.feature.chat.ChatRoute -import com.google.ai.sample.feature.multimodal.PhotoReasoningRoute -import com.google.ai.sample.feature.text.SummarizeRoute -import com.google.ai.sample.ui.theme.GenerativeAISample - -class MainActivity : ComponentActivity() { - - override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) - - setContent { - GenerativeAISample { - // A surface container using the 'background' color from the theme - Surface( - modifier = Modifier.fillMaxSize(), - color = MaterialTheme.colorScheme.background - ) { - val navController = rememberNavController() - - NavHost(navController = navController, startDestination = "menu") { - composable("menu") { - MenuScreen(onItemClicked = { routeId -> - navController.navigate(routeId) - }) - } - composable("summarize") { - SummarizeRoute() - } - composable("photo_reasoning") { - PhotoReasoningRoute() - } - composable("chat") { - ChatRoute() - } - } - } - } - } - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt deleted file mode 100644 index eb7800e3..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/MenuScreen.kt +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample - -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.items -import androidx.compose.material3.Card -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.Text -import androidx.compose.material3.TextButton -import androidx.compose.runtime.Composable -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp - -data class MenuItem( - val routeId: String, - val titleResId: Int, - val descriptionResId: Int -) - -@Composable -fun MenuScreen( - onItemClicked: (String) -> Unit = { } -) { - val menuItems = listOf( - MenuItem("summarize", R.string.menu_summarize_title, R.string.menu_summarize_description), - MenuItem("photo_reasoning", R.string.menu_reason_title, R.string.menu_reason_description), - MenuItem("chat", R.string.menu_chat_title, R.string.menu_chat_description) - ) - LazyColumn( - Modifier - .padding(top = 16.dp, bottom = 16.dp) - ) { - items(menuItems) { menuItem -> - Card( - modifier = Modifier - .fillMaxWidth() - .padding(horizontal = 16.dp, vertical = 8.dp) - ) { - Column( - modifier = Modifier - .padding(all = 16.dp) - .fillMaxWidth() - ) { - Text( - text = stringResource(menuItem.titleResId), - style = MaterialTheme.typography.titleMedium - ) - Text( - text = stringResource(menuItem.descriptionResId), - style = MaterialTheme.typography.bodyMedium, - modifier = Modifier.padding(top = 8.dp) - ) - TextButton( - onClick = { - onItemClicked(menuItem.routeId) - }, - modifier = Modifier.align(Alignment.End) - ) { - Text(text = stringResource(R.string.action_try)) - } - } - } - } - } -} - -@Preview(showSystemUi = true) -@Composable -fun MenuScreenPreview() { - MenuScreen() -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatMessage.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatMessage.kt deleted file mode 100644 index ce76394b..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatMessage.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.chat - -import java.util.UUID - -enum class Participant { - USER, MODEL, ERROR -} - -data class ChatMessage( - val id: String = UUID.randomUUID().toString(), - var text: String = "", - val participant: Participant = Participant.USER, - var isPending: Boolean = false -) diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatScreen.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatScreen.kt deleted file mode 100644 index d18846c3..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatScreen.kt +++ /dev/null @@ -1,222 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.chat - -import androidx.compose.foundation.layout.BoxWithConstraints -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxSize -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.widthIn -import androidx.compose.foundation.lazy.LazyColumn -import androidx.compose.foundation.lazy.LazyListState -import androidx.compose.foundation.lazy.items -import androidx.compose.foundation.lazy.rememberLazyListState -import androidx.compose.foundation.shape.RoundedCornerShape -import androidx.compose.foundation.text.KeyboardOptions -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.filled.Send -import androidx.compose.material3.Card -import androidx.compose.material3.CardDefaults -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ElevatedCard -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedTextField -import androidx.compose.material3.Scaffold -import androidx.compose.material3.Text -import androidx.compose.runtime.Composable -import androidx.compose.runtime.collectAsState -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.runtime.saveable.rememberSaveable -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.text.input.KeyboardCapitalization -import androidx.compose.ui.text.style.TextAlign -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import androidx.lifecycle.viewmodel.compose.viewModel -import com.google.ai.sample.GenerativeViewModelFactory -import com.google.ai.sample.R -import com.google.ai.sample.ui.theme.GenerativeAISample -import kotlinx.coroutines.launch - -@Composable -internal fun ChatRoute( - chatViewModel: ChatViewModel = viewModel(factory = GenerativeViewModelFactory) -) { - val chatUiState by chatViewModel.uiState.collectAsState() - val listState = rememberLazyListState() - val coroutineScope = rememberCoroutineScope() - - Scaffold( - bottomBar = { - MessageInput( - onSendMessage = { inputText -> - chatViewModel.sendMessage(inputText) - }, - resetScroll = { - coroutineScope.launch { - listState.scrollToItem(0) - } - } - ) - } - ) { paddingValues -> - Column( - modifier = Modifier - .padding(paddingValues) - .fillMaxSize() - ) { - // Messages List - ChatList(chatUiState.messages, listState) - } - } -} - -@Composable -fun ChatList( - chatMessages: List, - listState: LazyListState -) { - LazyColumn( - reverseLayout = true, - state = listState - ) { - items(chatMessages.reversed()) { message -> - ChatBubbleItem(message) - } - } -} - -@Composable -fun ChatBubbleItem( - chatMessage: ChatMessage -) { - val isModelMessage = chatMessage.participant == Participant.MODEL || - chatMessage.participant == Participant.ERROR - - val backgroundColor = when (chatMessage.participant) { - Participant.MODEL -> MaterialTheme.colorScheme.primaryContainer - Participant.USER -> MaterialTheme.colorScheme.tertiaryContainer - Participant.ERROR -> MaterialTheme.colorScheme.errorContainer - } - - val bubbleShape = if (isModelMessage) { - RoundedCornerShape(4.dp, 20.dp, 20.dp, 20.dp) - } else { - RoundedCornerShape(20.dp, 4.dp, 20.dp, 20.dp) - } - - val horizontalAlignment = if (isModelMessage) { - Alignment.Start - } else { - Alignment.End - } - - Column( - horizontalAlignment = horizontalAlignment, - modifier = Modifier - .padding(horizontal = 8.dp, vertical = 4.dp) - .fillMaxWidth() - ) { - Text( - text = chatMessage.participant.name, - style = MaterialTheme.typography.bodySmall, - modifier = Modifier.padding(bottom = 4.dp) - ) - Row { - if (chatMessage.isPending) { - CircularProgressIndicator( - modifier = Modifier - .align(Alignment.CenterVertically) - .padding(all = 8.dp) - ) - } - BoxWithConstraints { - Card( - colors = CardDefaults.cardColors(containerColor = backgroundColor), - shape = bubbleShape, - modifier = Modifier.widthIn(0.dp, maxWidth * 0.9f) - ) { - Text( - text = chatMessage.text, - modifier = Modifier.padding(16.dp) - ) - } - } - } - } -} - -@Composable -fun MessageInput( - onSendMessage: (String) -> Unit, - resetScroll: () -> Unit = {} -) { - var userMessage by rememberSaveable { mutableStateOf("") } - - ElevatedCard( - modifier = Modifier - .fillMaxWidth() - ) { - Row( - modifier = Modifier - .padding(16.dp) - .fillMaxWidth() - ) { - OutlinedTextField( - value = userMessage, - label = { Text(stringResource(R.string.chat_label)) }, - onValueChange = { userMessage = it }, - keyboardOptions = KeyboardOptions( - capitalization = KeyboardCapitalization.Sentences, - ), - modifier = Modifier - .align(Alignment.CenterVertically) - .fillMaxWidth() - .weight(0.85f) - ) - IconButton( - onClick = { - if (userMessage.isNotBlank()) { - onSendMessage(userMessage) - userMessage = "" - resetScroll() - } - }, - modifier = Modifier - .padding(start = 16.dp) - .align(Alignment.CenterVertically) - .fillMaxWidth() - .weight(0.15f) - ) { - Icon( - Icons.Default.Send, - contentDescription = stringResource(R.string.action_send), - modifier = Modifier - ) - } - } - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatUiState.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatUiState.kt deleted file mode 100644 index 48dea90e..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatUiState.kt +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.chat - -import androidx.compose.runtime.toMutableStateList - -class ChatUiState( - messages: List = emptyList() -) { - private val _messages: MutableList = messages.toMutableStateList() - val messages: List = _messages - - fun addMessage(msg: ChatMessage) { - _messages.add(msg) - } - - fun replaceLastPendingMessage() { - val lastMessage = _messages.lastOrNull() - lastMessage?.let { - val newMessage = lastMessage.apply { isPending = false } - _messages.removeLast() - _messages.add(newMessage) - } - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatViewModel.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatViewModel.kt deleted file mode 100644 index f102678d..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/chat/ChatViewModel.kt +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.chat - -import androidx.lifecycle.ViewModel -import androidx.lifecycle.viewModelScope -import com.google.ai.client.generativeai.GenerativeModel -import com.google.ai.client.generativeai.type.asTextOrNull -import com.google.ai.client.generativeai.type.content -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.launch - -class ChatViewModel( - generativeModel: GenerativeModel -) : ViewModel() { - private val chat = generativeModel.startChat( - history = listOf( - content(role = "user") { text("Hello, I have 2 dogs in my house.") }, - content(role = "model") { text("Great to meet you. What would you like to know?") } - ) - ) - - private val _uiState: MutableStateFlow = - MutableStateFlow(ChatUiState(chat.history.map { content -> - // Map the initial messages - ChatMessage( - text = content.parts.first().asTextOrNull() ?: "", - participant = if (content.role == "user") Participant.USER else Participant.MODEL, - isPending = false - ) - })) - val uiState: StateFlow = - _uiState.asStateFlow() - - - fun sendMessage(userMessage: String) { - // Add a pending message - _uiState.value.addMessage( - ChatMessage( - text = userMessage, - participant = Participant.USER, - isPending = true - ) - ) - - viewModelScope.launch { - try { - val response = chat.sendMessage(userMessage) - - _uiState.value.replaceLastPendingMessage() - - response.text?.let { modelResponse -> - _uiState.value.addMessage( - ChatMessage( - text = modelResponse, - participant = Participant.MODEL, - isPending = false - ) - ) - } - } catch (e: Exception) { - _uiState.value.replaceLastPendingMessage() - _uiState.value.addMessage( - ChatMessage( - text = e.localizedMessage, - participant = Participant.ERROR - ) - ) - } - } - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningScreen.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningScreen.kt deleted file mode 100644 index 8cc8f94e..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningScreen.kt +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.multimodal - -import android.graphics.drawable.BitmapDrawable -import android.net.Uri -import androidx.activity.compose.rememberLauncherForActivityResult -import androidx.activity.result.PickVisualMediaRequest -import androidx.activity.result.contract.ActivityResultContracts -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.requiredSize -import androidx.compose.foundation.lazy.LazyRow -import androidx.compose.foundation.lazy.items -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Person -import androidx.compose.material.icons.rounded.Add -import androidx.compose.material3.Card -import androidx.compose.material3.CardDefaults -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.Icon -import androidx.compose.material3.IconButton -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedTextField -import androidx.compose.material3.Text -import androidx.compose.material3.TextButton -import androidx.compose.runtime.Composable -import androidx.compose.runtime.collectAsState -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateListOf -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.rememberCoroutineScope -import androidx.compose.runtime.saveable.rememberSaveable -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.drawBehind -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.platform.LocalContext -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import androidx.lifecycle.viewmodel.compose.viewModel -import coil.ImageLoader -import coil.compose.AsyncImage -import coil.request.ImageRequest -import coil.request.SuccessResult -import com.google.ai.sample.GenerativeViewModelFactory -import coil.size.Precision -import com.google.ai.sample.R -import com.google.ai.sample.util.UriSaver -import kotlinx.coroutines.launch - -@Composable -internal fun PhotoReasoningRoute( - viewModel: PhotoReasoningViewModel = viewModel(factory = GenerativeViewModelFactory) -) { - val photoReasoningUiState by viewModel.uiState.collectAsState() - - val coroutineScope = rememberCoroutineScope() - val imageRequestBuilder = ImageRequest.Builder(LocalContext.current) - val imageLoader = ImageLoader.Builder(LocalContext.current).build() - - PhotoReasoningScreen( - uiState = photoReasoningUiState, - onReasonClicked = { inputText, selectedItems -> - coroutineScope.launch { - val bitmaps = selectedItems.mapNotNull { - val imageRequest = imageRequestBuilder - .data(it) - // Scale the image down to 768px for faster uploads - .size(size = 768) - .precision(Precision.EXACT) - .build() - try { - val result = imageLoader.execute(imageRequest) - if (result is SuccessResult) { - return@mapNotNull (result.drawable as BitmapDrawable).bitmap - } else { - return@mapNotNull null - } - } catch (e: Exception) { - return@mapNotNull null - } - } - viewModel.reason(inputText, bitmaps) - } - } - ) -} - -@Composable -fun PhotoReasoningScreen( - uiState: PhotoReasoningUiState = PhotoReasoningUiState.Loading, - onReasonClicked: (String, List) -> Unit = { _, _ -> } -) { - var userQuestion by rememberSaveable { mutableStateOf("") } - val imageUris = rememberSaveable(saver = UriSaver()) { mutableStateListOf() } - - val pickMedia = rememberLauncherForActivityResult( - ActivityResultContracts.PickVisualMedia() - ) { imageUri -> - imageUri?.let { - imageUris.add(it) - } - } - - Column( - modifier = Modifier - .padding(all = 16.dp) - .verticalScroll(rememberScrollState()) - ) { - Card( - modifier = Modifier.fillMaxWidth() - ) { - Row( - modifier = Modifier.padding(top = 16.dp) - ) { - IconButton( - onClick = { - pickMedia.launch( - PickVisualMediaRequest(ActivityResultContracts.PickVisualMedia.ImageOnly) - ) - }, - modifier = Modifier - .padding(all = 4.dp) - .align(Alignment.CenterVertically) - ) { - Icon( - Icons.Rounded.Add, - contentDescription = stringResource(R.string.add_image), - ) - } - OutlinedTextField( - value = userQuestion, - label = { Text(stringResource(R.string.reason_label)) }, - placeholder = { Text(stringResource(R.string.reason_hint)) }, - onValueChange = { userQuestion = it }, - modifier = Modifier - .fillMaxWidth(0.8f) - ) - TextButton( - onClick = { - if (userQuestion.isNotBlank()) { - onReasonClicked(userQuestion, imageUris.toList()) - } - }, - modifier = Modifier - .padding(all = 4.dp) - .align(Alignment.CenterVertically) - ) { - Text(stringResource(R.string.action_go)) - } - } - LazyRow( - modifier = Modifier.padding(all = 8.dp) - ) { - items(imageUris) { imageUri -> - AsyncImage( - model = imageUri, - contentDescription = null, - modifier = Modifier - .padding(4.dp) - .requiredSize(72.dp) - ) - } - } - } - when (uiState) { - PhotoReasoningUiState.Initial -> { - // Nothing is shown - } - - PhotoReasoningUiState.Loading -> { - Box( - contentAlignment = Alignment.Center, - modifier = Modifier - .padding(all = 8.dp) - .align(Alignment.CenterHorizontally) - ) { - CircularProgressIndicator() - } - } - - is PhotoReasoningUiState.Success -> { - Card( - modifier = Modifier - .padding(vertical = 16.dp) - .fillMaxWidth(), - shape = MaterialTheme.shapes.large, - colors = CardDefaults.cardColors( - containerColor = MaterialTheme.colorScheme.onSecondaryContainer - ) - ) { - Row( - modifier = Modifier - .padding(all = 16.dp) - .fillMaxWidth() - ) { - Icon( - Icons.Outlined.Person, - contentDescription = "Person Icon", - tint = MaterialTheme.colorScheme.onSecondary, - modifier = Modifier - .requiredSize(36.dp) - .drawBehind { - drawCircle(color = Color.White) - } - ) - Text( - text = uiState.outputText, // TODO(thatfiredev): Figure out Markdown support - color = MaterialTheme.colorScheme.onSecondary, - modifier = Modifier - .padding(start = 16.dp) - .fillMaxWidth() - ) - } - } - } - - is PhotoReasoningUiState.Error -> { - Card( - modifier = Modifier - .padding(vertical = 16.dp) - .fillMaxWidth(), - shape = MaterialTheme.shapes.large, - colors = CardDefaults.cardColors( - containerColor = MaterialTheme.colorScheme.errorContainer - ) - ) { - Text( - text = uiState.errorMessage, - color = MaterialTheme.colorScheme.error, - modifier = Modifier.padding(all = 16.dp) - ) - } - } - } - } -} - -@Composable -@Preview(showSystemUi = true) -fun PhotoReasoningScreenPreview() { - PhotoReasoningScreen() -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningUiState.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningUiState.kt deleted file mode 100644 index 8baf4752..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningUiState.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.multimodal - -/** - * A sealed hierarchy describing the state of the text generation. - */ -sealed interface PhotoReasoningUiState { - - /** - * Empty state when the screen is first shown - */ - data object Initial: PhotoReasoningUiState - - /** - * Still loading - */ - data object Loading: PhotoReasoningUiState - - /** - * Text has been generated - */ - data class Success( - val outputText: String - ): PhotoReasoningUiState - - /** - * There was an error generating text - */ - data class Error( - val errorMessage: String - ): PhotoReasoningUiState -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt deleted file mode 100644 index 5f5751a7..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.multimodal - -import android.graphics.Bitmap -import androidx.lifecycle.ViewModel -import androidx.lifecycle.viewModelScope -import com.google.ai.client.generativeai.GenerativeModel -import com.google.ai.client.generativeai.type.content -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.launch - -class PhotoReasoningViewModel( - private val generativeModel: GenerativeModel -) : ViewModel() { - - private val _uiState: MutableStateFlow = - MutableStateFlow(PhotoReasoningUiState.Initial) - val uiState: StateFlow = - _uiState.asStateFlow() - - fun reason( - userInput: String, - selectedImages: List - ) { - _uiState.value = PhotoReasoningUiState.Loading - val prompt = "Look at the image(s), and then answer the following question: $userInput" - - viewModelScope.launch(Dispatchers.IO) { - try { - val inputContent = content { - for (bitmap in selectedImages) { - image(bitmap) - } - text(prompt) - } - - var outputContent = "" - - generativeModel.generateContentStream(inputContent) - .collect { response -> - outputContent += response.text - _uiState.value = PhotoReasoningUiState.Success(outputContent) - } - } catch (e: Exception) { - _uiState.value = PhotoReasoningUiState.Error(e.localizedMessage ?: "") - } - } - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeScreen.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeScreen.kt deleted file mode 100644 index dc1ef9ae..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeScreen.kt +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.text - -import androidx.compose.foundation.layout.Box -import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.requiredSize -import androidx.compose.foundation.rememberScrollState -import androidx.compose.foundation.verticalScroll -import androidx.compose.material.icons.Icons -import androidx.compose.material.icons.outlined.Person -import androidx.compose.material3.Card -import androidx.compose.material3.CardDefaults -import androidx.compose.material3.CircularProgressIndicator -import androidx.compose.material3.ElevatedCard -import androidx.compose.material3.Icon -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.OutlinedTextField -import androidx.compose.material3.Text -import androidx.compose.material3.TextButton -import androidx.compose.runtime.Composable -import androidx.compose.runtime.collectAsState -import androidx.compose.runtime.getValue -import androidx.compose.runtime.mutableStateOf -import androidx.compose.runtime.saveable.rememberSaveable -import androidx.compose.runtime.setValue -import androidx.compose.ui.Alignment -import androidx.compose.ui.Modifier -import androidx.compose.ui.draw.drawBehind -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.res.stringResource -import androidx.compose.ui.tooling.preview.Preview -import androidx.compose.ui.unit.dp -import androidx.lifecycle.viewmodel.compose.viewModel -import com.google.ai.sample.GenerativeViewModelFactory -import com.google.ai.sample.R -import com.google.ai.sample.ui.theme.GenerativeAISample - -@Composable -internal fun SummarizeRoute( - summarizeViewModel: SummarizeViewModel = viewModel(factory = GenerativeViewModelFactory) -) { - val summarizeUiState by summarizeViewModel.uiState.collectAsState() - - SummarizeScreen(summarizeUiState, onSummarizeClicked = { inputText -> - summarizeViewModel.summarizeStreaming(inputText) - }) -} - -@Composable -fun SummarizeScreen( - uiState: SummarizeUiState = SummarizeUiState.Loading, - onSummarizeClicked: (String) -> Unit = {} -) { - var textToSummarize by rememberSaveable { mutableStateOf("") } - - Column( - modifier = Modifier - .verticalScroll(rememberScrollState()) - ) { - ElevatedCard( - modifier = Modifier - .padding(all = 16.dp) - .fillMaxWidth(), - shape = MaterialTheme.shapes.large - ) { - OutlinedTextField( - value = textToSummarize, - label = { Text(stringResource(R.string.summarize_label)) }, - placeholder = { Text(stringResource(R.string.summarize_hint)) }, - onValueChange = { textToSummarize = it }, - modifier = Modifier - .padding(16.dp) - .fillMaxWidth() - ) - TextButton( - onClick = { - if (textToSummarize.isNotBlank()) { - onSummarizeClicked(textToSummarize) - } - }, - modifier = Modifier - .padding(end = 16.dp, bottom = 16.dp) - .align(Alignment.End) - ) { - Text(stringResource(R.string.action_go)) - } - } - - when (uiState) { - SummarizeUiState.Initial -> { - // Nothing is shown - } - - SummarizeUiState.Loading -> { - Box( - contentAlignment = Alignment.Center, - modifier = Modifier - .padding(all = 8.dp) - .align(Alignment.CenterHorizontally) - ) { - CircularProgressIndicator() - } - } - - is SummarizeUiState.Success -> { - Card( - modifier = Modifier - .padding(start = 16.dp, end = 16.dp, bottom = 16.dp) - .fillMaxWidth(), - shape = MaterialTheme.shapes.large, - colors = CardDefaults.cardColors( - containerColor = MaterialTheme.colorScheme.onSecondaryContainer - ) - ) { - Row( - modifier = Modifier - .padding(all = 16.dp) - .fillMaxWidth() - ) { - Icon( - Icons.Outlined.Person, - contentDescription = "Person Icon", - tint = MaterialTheme.colorScheme.onSecondary, - modifier = Modifier - .requiredSize(36.dp) - .drawBehind { - drawCircle(color = Color.White) - } - ) - Text( - text = uiState.outputText, // TODO(thatfiredev): Figure out Markdown support - color = MaterialTheme.colorScheme.onSecondary, - modifier = Modifier - .padding(start = 16.dp) - .fillMaxWidth() - ) - } - } - } - - is SummarizeUiState.Error -> { - Card( - modifier = Modifier - .padding(horizontal = 16.dp) - .fillMaxWidth(), - shape = MaterialTheme.shapes.large, - colors = CardDefaults.cardColors( - containerColor = MaterialTheme.colorScheme.errorContainer - ) - ) { - Text( - text = uiState.errorMessage, - color = MaterialTheme.colorScheme.error, - modifier = Modifier.padding(all = 16.dp) - ) - } - } - } - } -} - -@Composable -@Preview(showSystemUi = true) -fun SummarizeScreenPreview() { - GenerativeAISample(darkTheme = true) { - SummarizeScreen() - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeUiState.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeUiState.kt deleted file mode 100644 index b0598131..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeUiState.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.text - -/** - * A sealed hierarchy describing the state of the text generation. - */ -sealed interface SummarizeUiState { - - /** - * Empty state when the screen is first shown - */ - data object Initial: SummarizeUiState - - /** - * Still loading - */ - data object Loading: SummarizeUiState - - /** - * Text has been generated - */ - data class Success( - val outputText: String - ): SummarizeUiState - - /** - * There was an error generating text - */ - data class Error( - val errorMessage: String - ): SummarizeUiState -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeViewModel.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeViewModel.kt deleted file mode 100644 index f0c20994..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/feature/text/SummarizeViewModel.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.feature.text - -import androidx.lifecycle.ViewModel -import androidx.lifecycle.viewModelScope -import com.google.ai.client.generativeai.GenerativeModel -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.StateFlow -import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.launch - -class SummarizeViewModel( - private val generativeModel: GenerativeModel -) : ViewModel() { - - private val _uiState: MutableStateFlow = - MutableStateFlow(SummarizeUiState.Initial) - val uiState: StateFlow = - _uiState.asStateFlow() - - fun summarize(inputText: String) { - _uiState.value = SummarizeUiState.Loading - - val prompt = "Summarize the following text for me: $inputText" - - viewModelScope.launch { - // Non-streaming - try { - val response = generativeModel.generateContent(prompt) - response.text?.let { outputContent -> - _uiState.value = SummarizeUiState.Success(outputContent) - } - } catch (e: Exception) { - _uiState.value = SummarizeUiState.Error(e.localizedMessage ?: "") - } - } - } - - fun summarizeStreaming(inputText: String) { - _uiState.value = SummarizeUiState.Loading - - val prompt = "Summarize the following text for me: $inputText" - - viewModelScope.launch { - try { - var outputContent = "" - generativeModel.generateContentStream(prompt) - .collect { response -> - outputContent += response.text - _uiState.value = SummarizeUiState.Success(outputContent) - } - } catch (e: Exception) { - _uiState.value = SummarizeUiState.Error(e.localizedMessage ?: "") - } - } - } -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Color.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Color.kt deleted file mode 100644 index 6180c124..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Color.kt +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.ui.theme - -import androidx.compose.ui.graphics.Color - -val Purple80 = Color(0xFFD0BCFF) -val PurpleGrey80 = Color(0xFFCCC2DC) -val Pink80 = Color(0xFFEFB8C8) - -val Purple40 = Color(0xFF6650a4) -val PurpleGrey40 = Color(0xFF625b71) -val Pink40 = Color(0xFF7D5260) diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Theme.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Theme.kt deleted file mode 100644 index db724b52..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Theme.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.ui.theme - -import androidx.compose.foundation.isSystemInDarkTheme -import androidx.compose.material3.MaterialTheme -import androidx.compose.material3.darkColorScheme -import androidx.compose.material3.lightColorScheme -import androidx.compose.runtime.Composable -import androidx.compose.ui.graphics.Color - -private val DarkColorScheme = darkColorScheme( - primary = Purple80, - secondary = PurpleGrey80, - tertiary = Pink80, - background = Color(0xFF1C1B1F), -) - -private val LightColorScheme = lightColorScheme( - primary = Purple40, - secondary = PurpleGrey40, - tertiary = Pink40, - background = Color(0xFFFFFBFE), -) - -@Composable -fun GenerativeAISample( - darkTheme: Boolean = isSystemInDarkTheme(), - content: @Composable () -> Unit -) { - val colorScheme = if (darkTheme) DarkColorScheme else LightColorScheme - MaterialTheme( - colorScheme = colorScheme, - typography = Typography, - content = content - ) -} diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Type.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Type.kt deleted file mode 100644 index 122f41ab..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/ui/theme/Type.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.ui.theme - -import androidx.compose.material3.Typography -import androidx.compose.ui.text.TextStyle -import androidx.compose.ui.text.font.FontFamily -import androidx.compose.ui.text.font.FontWeight -import androidx.compose.ui.unit.sp - -// Set of Material typography styles to start with -val Typography = Typography( - bodyLarge = TextStyle( - fontFamily = FontFamily.Default, - fontWeight = FontWeight.Normal, - fontSize = 16.sp, - lineHeight = 24.sp, - letterSpacing = 0.5.sp - ) -) diff --git a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/util/UriSaver.kt b/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/util/UriSaver.kt deleted file mode 100644 index 3581566a..00000000 --- a/generativeai-android-sample/app/src/main/kotlin/com/google/ai/sample/util/UriSaver.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2023 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package com.google.ai.sample.util - -import android.net.Uri -import androidx.compose.runtime.saveable.Saver -import androidx.compose.runtime.saveable.SaverScope - -/** - * Saves a list of Uris across configuration changes - */ -class UriSaver : Saver, List> { - override fun restore(value: List): MutableList = value.map { - Uri.parse(it) - }.toMutableList() - - override fun SaverScope.save(value: MutableList): List = value.map { it.toString() } -} diff --git a/generativeai-android-sample/app/src/main/res/drawable/ic_launcher_background.xml b/generativeai-android-sample/app/src/main/res/drawable/ic_launcher_background.xml deleted file mode 100644 index cd259e37..00000000 --- a/generativeai-android-sample/app/src/main/res/drawable/ic_launcher_background.xml +++ /dev/null @@ -1,184 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/generativeai-android-sample/app/src/main/res/drawable/ic_launcher_foreground.xml b/generativeai-android-sample/app/src/main/res/drawable/ic_launcher_foreground.xml deleted file mode 100644 index 3ae9094b..00000000 --- a/generativeai-android-sample/app/src/main/res/drawable/ic_launcher_foreground.xml +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher.xml b/generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher.xml deleted file mode 100644 index ec0bcbff..00000000 --- a/generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml b/generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml deleted file mode 100644 index ec0bcbff..00000000 --- a/generativeai-android-sample/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/generativeai-android-sample/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/generativeai-android-sample/app/src/main/res/mipmap-hdpi/ic_launcher.webp deleted file mode 100644 index c209e78ecd372343283f4157dcfd918ec5165bb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1404 zcmV-?1%vuhNk&F=1pok7MM6+kP&il$0000G0000-002h-06|PpNX!5L00Dqw+t%{r zzW2vH!KF=w&cMnnN@{whkTw+#mAh0SV?YL=)3MimFYCWp#fpdtz~8$hD5VPuQgtcN zXl<@<#Cme5f5yr2h%@8TWh?)bSK`O z^Z@d={gn7J{iyxL_y_%J|L>ep{dUxUP8a{byupH&!UNR*OutO~0{*T4q5R6@ApLF! z5{w?Z150gC7#>(VHFJZ-^6O@PYp{t!jH(_Z*nzTK4 zkc{fLE4Q3|mA2`CWQ3{8;gxGizgM!zccbdQoOLZc8hThi-IhN90RFT|zlxh3Ty&VG z?Fe{#9RrRnxzsu|Lg2ddugg7k%>0JeD+{XZ7>Z~{=|M+sh1MF7~ zz>To~`~LVQe1nNoR-gEzkpe{Ak^7{{ZBk2i_<+`Bq<^GB!RYG+z)h;Y3+<{zlMUYd zrd*W4w&jZ0%kBuDZ1EW&KLpyR7r2=}fF2%0VwHM4pUs}ZI2egi#DRMYZPek*^H9YK zay4Iy3WXFG(F14xYsoDA|KXgGc5%2DhmQ1gFCkrgHBm!lXG8I5h*uf{rn48Z!_@ z4Bk6TJAB2CKYqPjiX&mWoW>OPFGd$wqroa($ne7EUK;#3VYkXaew%Kh^3OrMhtjYN?XEoY`tRPQsAkH-DSL^QqyN0>^ zmC>{#F14jz4GeW{pJoRpLFa_*GI{?T93^rX7SPQgT@LbLqpNA}<@2wH;q493)G=1Y z#-sCiRNX~qf3KgiFzB3I>4Z%AfS(3$`-aMIBU+6?gbgDb!)L~A)je+;fR0jWLL-Fu z4)P{c7{B4Hp91&%??2$v9iRSFnuckHUm}or9seH6 z>%NbT+5*@L5(I9j@06@(!{ZI?U0=pKn8uwIg&L{JV14+8s2hnvbRrU|hZCd}IJu7*;;ECgO%8_*W Kmw_-CKmY()leWbG diff --git a/generativeai-android-sample/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/generativeai-android-sample/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp deleted file mode 100644 index b2dfe3d1ba5cf3ee31b3ecc1ced89044a1f3b7a9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2898 zcmV-Y3$650Nk&FW3jhFDMM6+kP&il$0000G0000-002h-06|PpNWB9900E$G+qN-D z+81ABX7q?;bwx%xBg?kcwr$(C-Tex-ZCkHUw(Y9#+`E5-zuONG5fgw~E2WDng@Bc@ z24xy+R1n%~6xI#u9vJ8zREI)sb<&Il(016}Z~V1n^PU3-_H17A*Bf^o)&{_uBv}Py zulRfeE8g(g6HFhk_?o_;0@tz?1I+l+Y#Q*;RVC?(ud`_cU-~n|AX-b`JHrOIqn(-t&rOg-o`#C zh0LPxmbOAEb;zHTu!R3LDh1QO zZTf-|lJNUxi-PpcbRjw3n~n-pG;$+dIF6eqM5+L();B2O2tQ~|p{PlpNcvDbd1l%c zLtXn%lu(3!aNK!V#+HNn_D3lp z2%l+hK-nsj|Bi9;V*WIcQRTt5j90A<=am+cc`J zTYIN|PsYAhJ|=&h*4wI4ebv-C=Be#u>}%m;a{IGmJDU`0snWS&$9zdrT(z8#{OZ_Y zxwJx!ZClUi%YJjD6Xz@OP8{ieyJB=tn?>zaI-4JN;rr`JQbb%y5h2O-?_V@7pG_+y z(lqAsqYr!NyVb0C^|uclHaeecG)Sz;WV?rtoqOdAAN{j%?Uo%owya(F&qps@Id|Of zo@~Y-(YmfB+chv^%*3g4k3R0WqvuYUIA+8^SGJ{2Bl$X&X&v02>+0$4?di(34{pt* zG=f#yMs@Y|b&=HyH3k4yP&goF2LJ#tBLJNNDo6lG06r}ghC-pC4Q*=x3;|+W04zte zAl>l4kzUBQFYF(E`KJy?ZXd1tnfbH+Z~SMmA21KokJNs#eqcXWKUIC>{TuoKe^vhF z);H)o`t9j~`$h1D`#bxe@E`oE`cM9w(@)5Bp8BNukIwM>wZHfd0S;5bcXA*5KT3bj zc&_~`&{z7u{Et!Z_k78H75gXf4g8<_ul!H$eVspPeU3j&&Au=2R*Zp#M9$9s;fqwgzfiX=E_?BwVcfx3tG9Q-+<5fw z%Hs64z)@Q*%s3_Xd5>S4dg$s>@rN^ixeVj*tqu3ZV)biDcFf&l?lGwsa zWj3rvK}?43c{IruV2L`hUU0t^MemAn3U~x3$4mFDxj=Byowu^Q+#wKRPrWywLjIAp z9*n}eQ9-gZmnd9Y0WHtwi2sn6n~?i#n9VN1B*074_VbZZ=WrpkMYr{RsI ztM_8X1)J*DZejxkjOTRJ&a*lrvMKBQURNP#K)a5wIitfu(CFYV4FT?LUB$jVwJSZz zNBFTWg->Yk0j&h3e*a5>B=-xM7dE`IuOQna!u$OoxLlE;WdrNlN)1 z7**de7-hZ!(%_ZllHBLg`Ir#|t>2$*xVOZ-ADZKTN?{(NUeLU9GbuG-+Axf*AZ-P1 z0ZZ*fx+ck4{XtFsbcc%GRStht@q!m*ImssGwuK+P@%gEK!f5dHymg<9nSCXsB6 zQ*{<`%^bxB($Z@5286^-A(tR;r+p7B%^%$N5h%lb*Vlz-?DL9x;!j<5>~kmXP$E}m zQV|7uv4SwFs0jUervsxVUm>&9Y3DBIzc1XW|CUZrUdb<&{@D5yuLe%Xniw^x&{A2s z0q1+owDSfc3Gs?ht;3jw49c#mmrViUfX-yvc_B*wY|Lo7; zGh!t2R#BHx{1wFXReX*~`NS-LpSX z#TV*miO^~B9PF%O0huw!1Zv>^d0G3$^8dsC6VI!$oKDKiXdJt{mGkyA`+Gwd4D-^1qtNTUK)`N*=NTG-6}=5k6suNfdLt*dt8D| z%H#$k)z#ZRcf|zDWB|pn<3+7Nz>?WW9WdkO5(a^m+D4WRJ9{wc>Y}IN)2Kbgn;_O? zGqdr&9~|$Y0tP=N(k7^Eu;iO*w+f%W`20BNo)=Xa@M_)+o$4LXJyiw{F?a633SC{B zl~9FH%?^Rm*LVz`lkULs)%idDX^O)SxQol(3jDRyBVR!7d`;ar+D7do)jQ}m`g$TevUD5@?*P8)voa?kEe@_hl{_h8j&5eB-5FrYW&*FHVt$ z$kRF9Nstj%KRzpjdd_9wO=4zO8ritN*NPk_9avYrsF(!4))tm{Ga#OY z(r{0buexOzu7+rw8E08Gxd`LTOID{*AC1m*6Nw@osfB%0oBF5sf<~wH1kL;sd zo)k6^VyRFU`)dt*iX^9&QtWbo6yE8XXH?`ztvpiOLgI3R+=MOBQ9=rMVgi<*CU%+d1PQQ0a1U=&b0vkF207%xU0ssI2 diff --git a/generativeai-android-sample/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/generativeai-android-sample/app/src/main/res/mipmap-mdpi/ic_launcher.webp deleted file mode 100644 index 4f0f1d64e58ba64d180ce43ee13bf9a17835fbca..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 982 zcmV;{11bDcNk&G_0{{S5MM6+kP&il$0000G0000l001ul06|PpNU8t;00Dqo+t#w^ z^1csucXz7-Qrhzl9HuHB%l>&>1tG2^vb*E&k^T3$FG1eQZ51g$uv4V+kI`0<^1Z@N zk?Jjh$olyC%l>)Xq;7!>{iBj&BjJ`P&$fsCfpve_epJOBkTF?nu-B7D!hO=2ZR}

C%4 zc_9eOXvPbC4kzU8YowIA8cW~Uv|eB&yYwAObSwL2vY~UYI7NXPvf3b+c^?wcs~_t{ ze_m66-0)^{JdOMKPwjpQ@Sna!*?$wTZ~su*tNv7o!gXT!GRgivP}ec?5>l1!7<(rT zds|8x(qGc673zrvYIz;J23FG{9nHMnAuP}NpAED^laz3mAN1sy+NXK)!6v1FxQ;lh zOBLA>$~P3r4b*NcqR;y6pwyhZ3_PiDb|%n1gGjl3ZU}ujInlP{eks-#oA6>rh&g+!f`hv#_%JrgYPu z(U^&XLW^QX7F9Z*SRPpQl{B%x)_AMp^}_v~?j7 zapvHMKxSf*Mtyx8I}-<*UGn3)oHd(nn=)BZ`d$lDBwq_GL($_TPaS{UeevT(AJ`p0 z9%+hQb6z)U9qjbuXjg|dExCLjpS8$VKQ55VsIC%@{N5t{NsW)=hNGI`J=x97_kbz@ E0Of=7!TQj4N+cqN`nQhxvX7dAV-`K|Ub$-q+H-5I?Tx0g9jWxd@A|?POE8`3b8fO$T))xP* z(X?&brZw({`)WU&rdAs1iTa0x6F@PIxJ&&L|dpySV!ID|iUhjCcKz(@mE z!x@~W#3H<)4Ae(4eQJRk`Iz3<1)6^m)0b_4_TRZ+cz#eD3f8V;2r-1fE!F}W zEi0MEkTTx}8i1{`l_6vo0(Vuh0HD$I4SjZ=?^?k82R51bC)2D_{y8mi_?X^=U?2|F{Vr7s!k(AZC$O#ZMyavHhlQ7 zUR~QXuH~#o#>(b$u4?s~HLF*3IcF7023AlwAYudn0FV~|odGH^05AYPEfR)8p`i{n zwg3zPVp{+wOsxKc>)(pMupKF!Y2HoUqQ3|Yu|8lwR=?5zZuhG6J?H`bSNk_wPoM{u zSL{c@pY7+c2kck>`^q1^^gR0QB7Y?KUD{vz-uVX~;V-rW)PDcI)$_UjgVV?S?=oLR zf4}zz{#*R_{LkiJ#0RdQLNC^2Vp%JPEUvG9ra2BVZ92(p9h7Ka@!yf9(lj#}>+|u* z;^_?KWdzkM`6gqPo9;;r6&JEa)}R3X{(CWv?NvgLeOTq$cZXqf7|sPImi-7cS8DCN zGf;DVt3Am`>hH3{4-WzH43Ftx)SofNe^-#|0HdCo<+8Qs!}TZP{HH8~z5n`ExcHuT zDL1m&|DVpIy=xsLO>8k92HcmfSKhflQ0H~9=^-{#!I1g(;+44xw~=* zxvNz35vfsQE)@)Zsp*6_GjYD};Squ83<_?^SbALb{a`j<0Gn%6JY!zhp=Fg}Ga2|8 z52e1WU%^L1}15Ex0fF$e@eCT(()_P zvV?CA%#Sy08_U6VPt4EtmVQraWJX` zh=N|WQ>LgrvF~R&qOfB$!%D3cGv?;Xh_z$z7k&s4N)$WYf*k=|*jCEkO19{h_(%W4 zPuOqbCw`SeAX*R}UUsbVsgtuG?xs(#Ikx9`JZoQFz0n*7ZG@Fv@kZk`gzO$HoA9kN z8U5{-yY zvV{`&WKU2$mZeoBmiJrEdzUZAv1sRxpePdg1)F*X^Y)zp^Y*R;;z~vOv-z&)&G)JQ{m!C9cmziu1^nHA z`#`0c>@PnQ9CJKgC5NjJD8HM3|KC(g5nnCq$n0Gsu_DXk36@ql%npEye|?%RmG)

FJ$wK}0tWNB{uH;AM~i diff --git a/generativeai-android-sample/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/generativeai-android-sample/app/src/main/res/mipmap-xhdpi/ic_launcher.webp deleted file mode 100644 index 948a3070fe34c611c42c0d3ad3013a0dce358be0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1900 zcmV-y2b1_xNk&Fw2LJ$9MM6+kP&il$0000G0001A003VA06|PpNH75a00DqwTbm-~ zullQTcXxO9ki!OCRx^i?oR|n!<8G0=kI^!JSjFi-LL*`V;ET0H2IXfU0*i>o6o6Gy zRq6Ap5(_{XLdXcL-MzlN`ugSdZY_`jXhcENAu)N_0?GhF))9R;E`!bo9p?g?SRgw_ zEXHhFG$0{qYOqhdX<(wE4N@es3VIo$%il%6xP9gjiBri+2pI6aY4 zJbgh-Ud|V%3O!IcHKQx1FQH(_*TK;1>FQWbt^$K1zNn^cczkBs=QHCYZ8b&l!UV{K z{L0$KCf_&KR^}&2Fe|L&?1I7~pBENnCtCuH3sjcx6$c zwqkNkru);ie``q+_QI;IYLD9OV0ZxkuyBz|5<$1BH|vtey$> z5oto4=l-R-Aaq`Dk0}o9N0VrkqW_#;!u{!bJLDq%0092{Ghe=F;(kn} z+sQ@1=UlX30+2nWjkL$B^b!H2^QYO@iFc0{(-~yXj2TWz?VG{v`Jg zg}WyYnwGgn>{HFaG7E~pt=)sOO}*yd(UU-D(E&x{xKEl6OcU?pl)K%#U$dn1mDF19 zSw@l8G!GNFB3c3VVK0?uyqN&utT-D5%NM4g-3@Sii9tSXKtwce~uF zS&Jn746EW^wV~8zdQ1XC28~kXu8+Yo9p!<8h&(Q({J*4DBglPdpe4M_mD8AguZFn~ ztiuO~{6Bx?SfO~_ZV(GIboeR9~hAym{{fV|VM=77MxDrbW6`ujX z<3HF(>Zr;#*uCvC*bpoSr~C$h?_%nXps@A)=l_;({Fo#6Y1+Zv`!T5HB+)#^-Ud_; zBwftPN=d8Vx)*O1Mj+0oO=mZ+NVH*ptNDC-&zZ7Hwho6UQ#l-yNvc0Cm+2$$6YUk2D2t#vdZX-u3>-Be1u9gtTBiMB^xwWQ_rgvGpZ6(C@e23c!^K=>ai-Rqu zhqT`ZQof;9Bu!AD(i^PCbYV%yha9zuoKMp`U^z;3!+&d@Hud&_iy!O-$b9ZLcSRh? z)R|826w}TU!J#X6P%@Zh=La$I6zXa#h!B;{qfug}O%z@K{EZECu6zl)7CiNi%xti0 zB{OKfAj83~iJvmpTU|&q1^?^cIMn2RQ?jeSB95l}{DrEPTW{_gmU_pqTc)h@4T>~& zluq3)GM=xa(#^VU5}@FNqpc$?#SbVsX!~RH*5p0p@w z;~v{QMX0^bFT1!cXGM8K9FP+=9~-d~#TK#ZE{4umGT=;dfvWi?rYj;^l_Zxywze`W z^Cr{55U@*BalS}K%Czii_80e0#0#Zkhlij4-~I@}`-JFJ7$5{>LnoJSs??J8kWVl6|8A}RCGAu9^rAsfCE=2}tHwl93t0C?#+jMpvr7O3`2=tr{Hg$=HlnjVG^ewm|Js0J*kfPa6*GhtB>`fN!m#9J(sU!?(OSfzY*zS(FJ<-Vb zfAIg+`U)YaXv#sY(c--|X zEB+TVyZ%Ie4L$gi#Fc++`h6%vzsS$pjz9aLt+ZL(g;n$Dzy5=m=_TV(3H8^C{r0xd zp#a%}ht55dOq?yhwYPrtp-m1xXp;4X;)NhxxUpgP%XTLmO zcjaFva^}dP3$&sfFTIR_jC=2pHh9kpI@2(6V*GQo7Ws)`j)hd+tr@P~gR*2gO@+1? zG<`_tB+LJuF|SZ9tIec;h%}}6WClT`L>HSW?E{Hp1h^+mlbf_$9zA>!ug>NALJsO{ mU%z=YwVD?}XMya)Bp;vlyE5&E_6!fzx9pwrdz474!~g(M6R?N? diff --git a/generativeai-android-sample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/generativeai-android-sample/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp deleted file mode 100644 index 1b9a6956b3acdc11f40ce2bb3f6efbd845cc243f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3918 zcmV-U53%r4Nk&FS4*&pHMM6+kP&il$0000G0001A003VA06|PpNSy@$00HoY|G(*G z+qV7x14$dSO^Re!iqt-AAIE9iwr$(CZQJL$blA4B`>;C3fBY6Q8_YSjb2%a=fc}4E zrSzssacq<^nmW|Rs93PJni30R<8w<(bK_$LO4L?!_OxLl$}K$MUEllnMK|rg=f3;y z*?;3j|Nh>)p0JQ3A~rf(MibH2r+)3cyV1qF&;8m{w-S*y+0mM){KTK^M5}ksc`qX3 zy>rf^b>~l>SSHds8(I@hz3&PD@LmEs4&prkT=BjsBCXTMhN$_)+kvnl0bLKW5rEsj z*d#KXGDB4P&>etx0X+`R19yC=LS)j!mgs5M0L~+o-T~Jl!p!AJxnGAhV%~rhYUL4hlWhgES3Kb5oA&X z{}?3OBSS-{!v$nCIGj->(-TAG)8LR{htr41^gxsT8yqt2@DEG6Yl`Uma3Nd4;YUoW zTbkYl3CMU5ypMF3EIkYmWL|*BknM`0+Kq6CpvO(y$#j94e+q{vI{Zp8cV_6RK!`&C zob$*5Q|$IZ09dW=L!V zw@#2wviu|<#3lgGE8GEhcx+zBt`} zOwP8j9X%^f7i_bth4PiJ$LYtFJSCN$3xwDN;8mr*B;CJwBP2G0TMq0uNt7S^DO_wE zepk!Wrn#Z#03j{`c*Rf~y3o7?J}w?tEELRUR2cgxB*Y{LzA#pxHgf}q?u5idu>077 zd^=p)`nA}6e`|@`p?u}YU66PP_MA}Zqqe!c{nK&z%Jwq1N4e_q<#4g^xaz=ao;u|6 zwpRcW2Lax=ZGbx=Q*HhlJ`Ns#Y*r0*%!T?P*TTiX;rb)$CGLz=rSUum$)3Qyv{BL2 zO*=OI2|%(Yz~`pNEOnLp>+?T@glq-DujlIp?hdJeZ7ctP4_OKx|5@EOps3rr(pWzg zK4d3&oN-X2qN(d_MkfwB4I)_)!I_6nj2iA9u^pQ{;GckGLxBGrJUM2Wdda!k)Y>lq zmjws>dVQ*vW9lvEMkiN3wE-__6OWD0txS&Qn0n22cyj4Q*8(nG4!G{6OOwNvsrPIL zCl-$W9UwkEUVuLwyD%|inbOF*xMODZ4VMEVAq_zUxZ+K#Gdqf!DW$5f)?7UNOFMz! zrB~tuu=6X2FE(p^iqgxr+?ZK;=yz`e;C$#_@D9Lj-+TDVOrva>(#*PVbaHO>A)mhl z07OJWCqYC60518$!&c`eNBcBW%GnfaQ*$eazV^2_AW?j)h;J1nUjN(I9=0+!RVx~% z3@Tf!P0TE+98jA?WceK-}A1% zW!K)lyKcGqy#M~})315-A#2NXQ`?6NR#Apo=S!oF=JfpX>iR*49ec{7AN$xxpK{D$ z2d%Fz&rdfSqourN$~Y^NFIMV1CZ?J*bMx~H3k&meGtH@q9ra2vZxmA$S(#jaaj-g4 ztJmxG+DLV<*q<|sDXPp$X>E)#S}Vm&sRaO5P&goh2><}FEdZSXDqsL$06sAkh(e+v zAsBhKSRexgwg6tIy~GFJzaTxXD(}|+0eOwFDA%rn`X;MVwDHT9=4=g%OaJ9s%3b9>9EUTnnp0t;2Zpa{*>mk~hZqItE_!dQ zOtC>8`$l|mV43Jbudf0N6&&X;{=z}Zi}d1`2qmJ}i|0*GsulD3>GgQXHN)pkR6sf1 z?5ZU%&xtL}oH;YiAA)d*^Ndw2T$+Mjuzyzz@-SM`9df7LqTxLuIwC~S0092~+=qYv z@*ja;?Wt!T!{U?c*Z0YtGe)XbI&y-?B&G2$`JDM)(dIV9G`Sc#6?sI60de6kv+)Qb zUW~2|WjvJq3TA8`0+sWA3zRhY9a~ow)O~&StBkG2{*{TGiY~S8ep{V&Vo2l<6LWsu z^#p0-v*t2?3&aA1)ozu|%efSR=XnpX$lvTeRdKlvM!@|pM5p2w3u-6 zU>}t2xiYLS+{|%C65AzX+23Mtlq?BS&YdYcYsVjoiE&rT>;Necn6l^K)T^lmE`5u{ zm1i+-a-gc;Z&v-{;8r)z6NYfBUv+=_L}ef}qa9FX01)+Aaf+;xj(mL6|JUzGJR1|fnanb%?BPPIp>SCjP|8qE5qJ{=n5ZGw?81z3(k;pzH%1CtlX50{E7h)$h{qGKfzC`e2o`*IqA#tjA z`Fz&^%$b9F*N`)U-#6>a)Z`55`$Dd0cfcs0$d13^ONrdCu9xcv_=n#WQo8stcz3jP9|2EvdI-RhJM3%Q%oM&!OlShM|0 z?gz?wHZSnm45njLtsz8PVT1S&jAlbKg5kVam$p16=EK@Sj4EP0OtH zmJDmdc^v)x>56Qg_wmYHz6h)>kl_h$>0@J!ypv%APmjZTAQVLy6Fu50RGY&JAVNhx zrF_qG6`x9MkT;1SFWo$)l{M$;3qUDn9JwE}z zRl#E_bDRJFii61kPgBybIgp8dNW!Cc1b*^YYk-#oWLJvtM_v^hQx~9?8LD4VFFxBF z3MlrsSC%f9Oupn*ctPL0U1fwfX?`tRhPD{PSLFPQOmIt$mDy0SgpNVvHS+f#Do>h1Gn?LZU9(KaN>Q_=Y*_T zvtD7%_u^^+{g`0VGzg(VZrpVQ6Ub5M=tI_p7T93R8@3Zulu3|#{iNcu!oiHxZ4Rf*( zfmiN$$ru(*_Zqn=`Gq#OuHRTSwp7uH_SokR&|)RuW5yo=Z|_4?qU-JU+tpt>!B&Is z@N(=SG;bpVc;AO@zbmMM zScqq1)b-ZQIrs={oD}|?6y{$HNB1U0^LsBh8JI&3!GBZxOXI<}&5-$lgkAaYqhOTb z?2vEnZ$-kk;*M_17(upJF3%+iH*s0-r{vttXVB2OUwI1s^+G(Ft(U8gYFXC}#P&E^ z>T@C^tS`Z7{6HT4_nF~n>JlZtk5&qDBl6r|^kzQYe`wq!C)n@$c>WOPA61NDFj<<6 zGW71NMMhwAl!U-yqrq2xrSFqRCI8acw7?}3j;ynxo*-b7Co;g5r%^j=H@9({PXXBf z@r>U>>N;E)81wx`B4f%{PB~MHka_);%kBCb(d|Jy5!MqJ%2p`t&@L)4$T2j&-WHvG zv3(uyA_gwqNu(k?jQTtv3dgPKRZoH8prxe7>pQBW5L&dpumS&5Ld2?(sCpJjvc4L5 zEnh&?91WVm)ZdTj=fjJ$pPDdgAttLXuke+?KdKxu*;kTC(r!tQk6;gxj4h%FdHAt(^M3YvYj(!tOeN)+Hvj6+< zzyJRG?^lZfWuR#t!tUKP&(?%3v&Zd$R2YN>lB(Lq`OInY48%4%yTv2 zYe1{G`3)(PDEio5Y@-I5tUf`c%%OCJMtSW56g3iEg%3`$7XSJJHyA z<|7&N)5Xrlgv~%BO24eFd;Hd;uiK%D`EdK|quUeRZDqbh9l)%j%J#0lfrZumvA<_w zu&=AVvdChf6}eqh(bUz`(`Ue*p01{fBAcTgKyDYLs_I+YyJEk+rM@avU~>fB$n)HS zM7pfJydu`i%gfS<{PF94kZDv$t>06sAkheDzu40NJ$5CMW%n^Lls?8^p^QGWURbKu3ZduZQZ((s2? zzE`}<{;Zt7<$C|9R8A~DJ~@%x>TfP zF>TX8)@v|t)q4GjRt<}5s6hLHwRel7>V@&r-O|Av(yh;Q1A{E>Ir>p+%dHD|=l+lT zpr(Dg&>#Nu=!)6bCLr-ZS%|;h)Ij$+e@r8_{qO19QvDe=&1tmpY*0lcA^Cc-#{9fQ z<~$*<&P$Q<_jy#<$40PMofM7aQ}C=jphI`4kLg}Z7CIN#26D{-4v-_CA-LiE@(%{y!BzsU%gG`Q?sjLUf%qFSl0y)2#ae*+EI>s|i`d^V$Dn)qmzqRq6VJRY|{4ujsIU%#bnqU6MR&-1I_43=|5(6Jr;Jvert) zE?S|Tmn}Tv<-??sxV5@9t}3D=>YZ0JrQe$CO~|EY=Lj9RM&4svQHPQL6%pV5fPFiH zfXDx;l@~et{*{U*#c#Dvzu)|znDO7$#CRx)Z&yp-}SrD{&|(MQtfUz~n35@RLfUy=aqrhCX0M}J_r5QsK~NmRCR|Nm&L z41UdsLjWxSUlL41r^0K&nCCK>fdR-!MYjFg(z9_mF^C|#ZQw?`)f6uVzF^`bRnVY& zo}@M06J&_+>w9@jpaO4snmU;0t-(zYW1qVBHtuD!d?%?AtN7Plp><-1Y8Rqb20ZaP zTCgn*-Sri4Q8Xn>=gNaWQ57%!D35UkA@ksOlPB*Dvw}t02ENAqw|kFhn%ZyyW%+t{ zNdM!uqEM^;2}f+tECHbwLmH*!nZVrb$-az%t50Y2pg(HqhvY-^-lb}>^6l{$jOI6} zo_kBzj%8aX|6H5M0Y<)7pzz_wLkIpRm!;PzY)9+24wk2&TT{w--phDGDCOz{cN_ca zpnm7`$oDy=HX%0i-`769*0M6(e5j-?(?24%)<)&46y0e&6@HCDZAm9W6Ib#Y#BF6- z=30crHGg+RRTe%VBC>T00OV6F+gQDAK38Ne3N9bm|62tPccBJi)5{B z4zc^Db72XiBd}v$CF|yU{Z=M|DZ%-(XarYNclODlb1Kz1_EKLy(NSLCN`eUl(rBCL zT*jx@wNvze0|TSqgE(QArOZU)_?qH(sj#TwzElLs9q)(0u!_P|R%Cy_0JFQxgGV>1 zz4?_uq<8_gM0`c*Hh|;UMz~vrg1gQXp{ufg`hM_qU;U>+zmvc5blCLSq@PrEBSGR# z&8=2Z4uXN`F3p73ueD1l{s{k$WipAvSh5W7ABe?4)t;r@V?y`bNB5FvBuE|0VRTb< zM1Hn^?DSsJY+sX@T5xW=#>T9VEV|?<(=6|ge$X6Sb05!LFdjDcoq*gM(Zq=t;_)Le&jyt(&9jzR73noru`a# zN*<`KwGa^gZU3-)MSLF0aFag#f0<>E(bYTeHmtdbns#|I)-$)mJ`q9ctQ8g0=ET?| zdO}eZ*b_p>ygRTtR^5Ggdam=Zb5wmd{}np+Jn1d_=M`~P=M67jj})fH4ztb5yQqQW z^C|C&^LHAK-u+ooIK)yM)QM?t;|<{P;;{`p=BclzAN#JzL4jCwXkQB1Dy{=^KR`=~ zTrr)y7eiYBzSNs_DvO=4A6#EgGS-zY%Vi)N*Yb`U;6o}KR}dq{r9pT5wqZ@3NOE8- z9-(}D|Nc5732CSYQbL)!gPQ#RbD8BhK3dl{sUuPvei0tkvnJBxDEAYTesU8H$)g(Plra{VH(v3u^CO1~(+ zU0O7#)jaS4{NcwA+LuSm&VBcX2#Im3xg)W}ySNw%->orn1taZ&+d)}8gJTqA!u|5P z{yv?zol_3|(1(%M(EVU=cp?L`{Pi|ixk{U)*guFML3P!OSlz;zGA#T+E@8@cgQ_mv1o7RSU=Zo_82F?&&2r;WE z@wk}JHYEZ9nYUc(Vv~iTCa3u8e4q(yq<29VoNbKk|`mq%I6u)My=gPIDuUb&lzf4`MEA9^g8u z)vp8|$$HE9m_BTV?lOosIGa4jud=jIbw)O2eCMfyw2*S8?hjWw^nqws$O*M$3I1)x zR0PWFb3$ySOcGTe1dz%N0l;RPc`x%05FtT^f^j{YCP}*Q=lvp4$ZXrTZQHhO+w%wJn3c8j%+5C3UAFD&%8dBl_qi9D5g8fry}6Ev z2_Q~)5^N$!IU`BPh1O|=BxQ#*C5*}`lluC515$lxc-vNC)IgW=K|=z7o%cWFpndn= zX}f{`!VK02_kU+Q5a3m37J;c} zTzbxteE{GNf?yLt5X=Bzc-mio^Up0nunMCgp*ZJ;%MJvPM3QK)BryP(_v@ei4UvHr z6+sbCifQaOkL6-;5fL8$W($zZ_;CZp305C;~$hhRquZr-r)jjd1z z31%ZK{-(`P#|Um_Sivn@p$-vz46uqT>QG0B1w9znfS9A8PB2LaHdzA|_)yjXVR*l{ zkcu3@vEf7bxH0nkh`q?8FmoO_Ucui*>_a~P?qQrlZ9@+D7%MTpSnztpylXrt5!-k8_QPB?YL8Kx_On8WD zgT+111d(Op$^$&KLAN5+@?>f7F4~wFi(8TL8+szgVmcMDTp5l&k6~=rA{Dt}!gb^r zSWY<)M7D|Z2P0cEodj6E42PV>&>DFmQpgt)E-|#sSUU@uKed+F680H@<;-x{p|nuH4!_mn85rx>wz;0mPi2ZkL#k6;sznu?cXh!T0S>{w6 zL^gvR05NY64l*<+_L>On$rjx9!US;l;LX6@z}yi#2XHh)F@Oo+l)h%fq$v}DNmF2> zfs^_t0)3N-W<9-N?uedVv{)-J0W5mh#29QM5R5h&KuiRM=0Zvnf#lF=K#WlCgc#9c zS;qvh(P$!_a8JwyhI^ZJV2k+B6Z^64?w|1?5gyo6y{}923CRZfYVe1#?F% z7h2SUiNO3;T#JUOyovSs@@C1GtwipycA=*x5{BpIZ_#GCMuV8XK=x;qCNy{d7?wA~ zC+=vjls;ci&zW=6$H~4^K%v{p}Ab?U%C6Z4p%eC<3ExqU$XR<}LLF67A$Sr20DR_pJ3yeBa~ z^sw{V0FI5;UpwXsScYuhbqGQ`YQ25;6p6W^+tgL&;Ml;>S3CGpSZ>VrTn0m1$y$HU z&65)I!c?oREz};c=nLCliriqQX->4uivHTgd${GqeAlf*!P^B|jkU|*IdNP(&6C>4 zqOW$)Nw9nvjy^&`?E|gotDV{JmJ9Q~vuhy<`^C4XIUDt|j4o6rK^e8_(=YqC zuaR6TRVf@tUFHB079o4MBIh{M~4>WwnGgesQH*3?w(RA%hCZ*7)b!aNV=yOQ%o_Y=Lt0Sl*(9^jfRnC210Om$=y>*o|3z} zAR&vAdrB#mWoaB0fJSw9xw|Am$fzK>rx-~R#7IFSAwdu_EI|SRfB*yl0w8oX09H^q zAjl2?0I)v*odGJ40FVGaF&2qJq9Gv`>V>2r0|c`GX8h>CX8eHcOy>S0@<;M3<_6UM z7yCEpug5NZL!H_0>Hg_HasQGxR`rY&Z{geOy?N92Z z{lER^um|$*?*G63*njwc(R?NT)Bei*3jVzR>FWUDb^gKhtL4A=kE_1p-%Fo2`!8M} z(0AjuCiS;G{?*^1tB-uY%=)SRx&D)pK4u@>f6@KPe3}2j_har$>HqzH;UCR^ssFD0 z7h+VLO4o@_Yt>>AeaZKUxqyvxWCAjKB>qjQ30UA)#w z&=RmdwlT`7a8J8Yae=7*c8XL|{@%wA8uvCqfsNX^?UZsS>wX}QD{K}ad4y~iO*p%4 z_cS{u7Ek%?WV6em2(U9#d8(&JDirb^u~7wK4+xP$iiI6IlD|a&S)6o=kG;59N|>K1 zn(0mUqbG3YIY7dQd+*4~)`!S9m7H6HP6YcKHhBc#b%1L}VIisp%;TckEkcu0>lo@u995$<*Em;XNodjTiCdC%R+TX|_ZR#|1`RR|`^@Teh zl#w@8fI1FTx2Dy+{blUT{`^kY*V-AZUd?ZZqCS4gW(kY5?retkLbF=>p=59Nl|=sf zo1Pc|{{N4>5nt#627ylGF`3n>X%`w%bw-Y~zWM_{Si$dc82|=YhISal{N7OY?O`C4 zD|qb}6nLWJ`hUyL+E>-;ricg9J@ZNYP(x(Sct&OI$Y!QWr*=^VN;G3#i>^1n4e#Je zOVhbFbLpXVu*16enDM+ic;97@R~u&kh__kgP#!R`*rQEnA+_dLkNP~L`0alC|J;c; zeiK=s8;BsLE)KbG3BD&Br@(Ha@SBT&$?xX`=$;eeel=|R_dIr6-Ro?=HEjnsJ_b`1 zK6Yg^-6;^2aW!xeTK)A~3Rm|L^FCHB_I>jIju7ZGo&N_1*QHkxH2!!%@o4iZ?vntS;&zJdPe1dH#04YD93A44o-MpfD zP{rn_aq>U%RDvC2+bp;xPlsOzauIi3*Lf42`jVKKZCRuKdYhi>FDuL2l=v{$BCN#Q6796s%r-AG$Q^t(3c@ zD?w0UhYr11@feiyl9kY_@H8~|xlmO<8PfQmj1!$@WieW@VxR@Psxfe-v9WCi1+f>F4VL?0O~K7T?m4-u|pSkBpUJZZe*16_wAp zSYZ@;k`3;W3UHKUWc8QeI}0jH5Ly=cGWQPw(Kr2fm=-5L(d`lcXofy8tJY3@Tuadz zYWXR{mW7XT!RF#RVCe%}=tM*O6!AD3^(!8un~opNI%Uko7$5t@<8+?; zTxDys(MyyGsUjtSu9$+|_-t!U3fVb1dkK?l`17<+jfl=hrBHnDSV>^R1=TnQeyqbW z>ov#l%!1|S!1>8UUxIdhQq`_klcHVx0{?#>K3#$4GlXncwldt!g17TcvKq-jo_996 z>oA=tH9CqRl6Yw?Uc`am!V?lHJbizOJaVaScf1UP5e7Dbgabq=b!B~T&_F6?ooU>w%x0A zH~&MHJ=q`fCH{U<7MDXE4SD32cDZA)WJeWkllJ`UspWaS#eDe^kg^oU_A14UE9zG-a^g{xaXf$})Wik>gT zl#dkzGr(;h0JZDuFn(+k8wNq?PZ5grQ<+sM?wBGt@JnH6v0#or-5wBQWKU~(S_> zkE!tc*ZJ1Y&*p(xX84POb3cClRMd!^qJ#CAZfIepEj-<`VURS_yCz0(?*Ixcj4 z-!zV1_QZhpm=0<;*(nm+F>T=)o?ep@CK5I%g^VAA+RB25ab?7)A~z~egru=I1S|@v zH7tXV!0wmGS^qj#e+MY;C5eUjEAp$Y?LDkS^QPZ}8WN85?r$u<-Epi;yZ1|J2J`se z$D6DpH~2F=eI0B&=UFAUnJvZAmClJlK)sutJ?M>xpZiWV&0=G4MZP+x+p>EX=HbCz zxls%Mw?*u^;LbHWIWCyq+yi)`GmFn9J112CZda_u@YIP%i;srFg_paU02Ifij*7}l z&CF-(3|>*a|+vbNR`^RP=9G?ymEJ0Z~)d&c*UE$UMepZ zcITr{0WqhxkjUnM15js_gW=e3Uh|y6ZReaXHIz-=p`x5VvB&rH9y>Amv@^WmXFEw) zQXYrk3feir=a{jMQ+wDIkkFnZ$k{sJakHn*?u za%4b!00ev8NVLM1TY=cl?KB&55BY_MU-sg?c>=Dbz_W{(Z~c?HJi*XpYL)C6Bd8WH zt+v-#0&o~@t4qESi*)+eW%@VD0|o^yF)n0hME$UtXF$*Lvh}7sso{`|pn*JDIy5^Fm3s$5*zEE=?u5<=l8FJc3r%+H} zdfoNl2J0^~!-*mOL5o-x32|e0Im*E!yY7F7E5N)W3>+v_LBydlEx?4$RL5f2oYRD# zaR0wv(-p~wO0eLDl3K=%`{5+0Gd$ktO=W)gWlGZJ0`K z$_RNA=ckrfa;H0KA~dR^p�(p-{x$&=IACIfoAR!za)F-^da-t3#0Dycnp zwO~NVXwXCl;jE<}>%@xz|=8fIJAB?>+E{7)|4l${4ngA3G|=r z2Dyv;VVWSgZx9Wj>qUjleGl3Ei9K4>h!(lPS%8VOG>Xu0%6VDz^O=bjJmuP7>DeUv zrbI}MlHB^^d?{zv6d=@_ZD2lg1&G7UjnVN{1}9WkaM3H~btX0GtSzB+tZ^qRgWo4m z!GmimlG$=wgXCnr6j@m<1gAL46#T~5Bnm=2{^@>|t&`9mkEPddj zAvG~@Tv~TAm2i%VW}R-g(Z0)z-Y|szHr@rk>4MAyG*Ma*7Yh#H7(!-5>DZ@8r;_dx z{prSe<>~099F8vsYd2xff7uAS%7{S)f(|@me3t2$iy&NEc7OUEchp@9A|X;;IA>8!oX+y(BKJ$EzV* znR$z;!L$s7uy@{OT~nG#B!NRraT8(X##Ho!0r_o@gg0CA-9H^;-uE&?$2$nHv_00o z%cbuUc-tCx$Uh&EZ4Nf4Zgqv)Y6>usG3>GeQnxx_Z6+PcbX-+ysbt1hQ`K1LDpOE? zrAhIZhSN9yVIAOa22gn577tbc&i3|3V8NWy&!tw##`}9*x}gtI^h1DzZRA>UuaJG) zaZ7j)dq!O}{?#8Y7~7i6fHh4{`pL?>-18|p!S75Y#^DM>-S3)vuZG+Q7l@ek zQP~#cBpWgg#mApc_sPYjpw8odQuRokmTkzcNl`^CcKB7e&;zViV;{Y{o^Y$%7i0m# z62%#1Lq!RC?}lK>%mp}T!3Xv;L*0v*>USLm``N%>w>@fwC+#T&Tx2bN4w(20JB}oU zuSa6v^kXi0xPs?pbaOHnyiqq6By1EZY9OZ^^QA>{q-Hsd&m`pbQ%8121aWG-F5xf zlZ%;B{;C>X19|`^_?dVyCq>n+41w7|!tUS!{9rHlbhX=SZO5CQ^;!Du_E7*`GiR^Q w)2!4MKjfSAeNo!9>IaV6aUZ*?W>} zs4%E?srLW`CJh0GCIK@hTkrW7A15Iu%N&?Q^$0+!{Tv&|t^Y@u%!L zglTg&?Q5q#ijZ;&HBQ?FNPp;k3J5!&{^+SGq?AX~SiOM9jJMRpyP?RCr@z38AQyy&WRMaC;n4una$~nJKSp?q|s8F00c9?Q! zY_ovvjTFm+DeQM^LXJ#v0}6HRt3R1%5PT*}W!k8BEM;Jrj8dIceFo2fhzTqaB3KKk zGlCLI)gU25(#u6ch6GeB1k@eHq7l{EHXv0n6xE#ws#ri}08kkCf8hUt{|Ejb`2YW* zvg}0nSSX1m=76s?sZhRY$K=3dpJ+y*eDULGnL2}4>4nvW^7_<~wIM_5fjvwt4h1|g z)g0Z6ZFq9j<~9~b8((~TN{Z?ZQfw|is&Xp~AC61sj;xItKyCHdI|tCMC_LbXF>~vR z=w6V3^H=W4CbAgR4#xw}ETTwu2guW~=Crl@SMXv85jQ=%y!s^?m4PI0My7MWICO;- z175jm%&PcPWh8QdOU(#8bp4!N7ET-+)N}N2zk2)8ch|4Q&lPFNQgT-thu053`r*h3 z_8dI@G;`zn;lH$zX3RzIk`E8~`J=BBdR}qD%n@vVG1834)!pS1Y?zVkJGtsa(sB~y zNfMYKsOJb%5J(0ivK8d+l2D2y&5X!cg3BG!AJ}910|_${nF}sC1QF^nLIhzXk-Y#x z0)&1iK!O;Og0Ky!;`b~v%b$`S4E&fB)1NB4v@8wr( z&+NX4e^&o)ecb=)dd~C!{(1e6t?&9j{l8%U*k4)?`(L3;Qjw z#w7FS+U(94MaJKS!J9O8^$)36_J8;thW#2$y9i{bB{?M{QS_inZIJ!jwqAbfXYVd$ zQ5fC$6Nc9hFi8m^;oI-%C#BS|c8vy+@{jx6hFcf^_;2VRgkoN(0h!_VSGmgNPRsxI z8$rTo0LaYq-H5i&gtj81=&xU?H-Y2==G@uQV7E`@+2E9XQW@{&j`?EOktk|Ho{HU>ZqDzvgjwBmdex z&uZNd2C1h{{}2k6Ys9$*nFP3;K%u!MhW`uZy7Sn`1M1zs@Es&;z*Z>Gsh@-3Fe6pE zQD2@cqF((NrRevgvLsvM_8;;iNyJ5nyPyy?e!kvKjGj`6diRFBEe49Oa7wwkJFV7Z z$YT&DWloYu-H?3<0BKn9L&JYDT-SK~*6c5pi18P26$JESKRYj{T7Zk6KiRJcbvOO*{P56Q6s8msbeI3>|j>K9}Q9UBeq*inXKemCm`-<5|-$ZyN4u$(3 z&HcvqehFD%5Yrmykg-^d`=BSa8(i=>ZoC77^mWY{evp(km@aHqhUECBz76YiR+VYK zY_avFC~V3$=`6C4JhfHAQ@DZtUOwH`L;oYX6zK0-uI^?hS$ALfq}A7evR;ohJHij} zHSZdW?EKv9U1s4oD*<(0oQ*;MaQ6@cvGL zuHCPgm_NhVsgp^sfr*ia^Db}swo1?O(_Q2)y+S$CBm+g=9wCOUPbz(x)_GbaKa@A7 zuI&!ynLiZRT#V%_y_-D`0Z5lT*auoe{(U5NylTzFSJW()W-#F6*&A`LNO1bV#Y;QJ zSbLBnp|B^dtK|KIWC|No>JjWBWE@n7O)x{&^E(WMeMvp57#qA8m* zeTow*U@_86B#Fm*rxyYu5PRWaWHx8y> z*qmHEp(AMDl0v)ij(AY8fnH=~ZwwjVAbu*m5;xPfidh@ov6d8g zfJsi&!QyK53Es%sC39ts;54V68koALD4b|%tNHW0bIkZAJKa=W&FomJSEDT>W1xIX z1x%Z>AvNIsSPLcn3RTcHXb@KB?cuM)=x6fcIx>&(GxqZ8w3p#jJ(GVgc*`c0HG}dv zIop&Qim!K1NFwic%07KcjWgHBPUkq7f~lj;TPqVGTiT#cUeim>;nY`>h@a*S{qQex zQ`z62WK|Mj)Y{tfF{;T4P;c8$Q|KU?Joh zIkA^z%X7z|r>4aTh@|StTi!-r1D!g=zb#3d#{{&K3CqE$Iz-UH<%37c zRfkO`&uM%#AD3PHv`g5t0e^O%nVL0d{Xlx^EjEC3#skF@`zl-7PF^0oxW)1!C!JxR zWvuAHH?)61FKA1QeT*_sY7;_Id#!GmV4n`MO{~sv}VLSK` zXRw=Y=Clz*00B(5y^K;gCZMAzjT5+c3IC=)l(9VIDdatpxj3y89WwI|bH&$!ZEvp` zPR!T@#!(|KfI-w?!&+7$N3F6>tD{YO4Qg$d_`nNEdfVCha9vaPn0jI0`)`@*72hq! zpU5ND^P*RoEkbD5o#az(-g=Y)L>HH>Oc%}$ zT3Rs_ih0;4+Lv4Y;@Iv(;fUbQ=i-G(#>vghec~*j(I#r|5mqFiJBpzi&hzEcD{u$< zRsm0BVYn=pT;0>R(itW|*D&;O%bOc7et9ACaH#J>z3A1A~6fdP>pmbM%xzm4>|;c_?B+%sl;Qs2{t!60$^u zH1t@9^6>;?!FuusnISi$f5CL&;z?EqJN$FBuWDA#D5`cy_UvCFIVvf{c?4N0teh;d zET$7aVbj08KTQS!x?Nd1Is8q8qFzs}a=!@nJ;7FSfCY^T@D-gpw`w<6e#X3+;O}1h z$%I!M)0bg|EKUA04Qjn@+x{Rj8vt6Wn!R|3A92z}^$KfF5(#CWr4y#~re1CN4i4w0 z#GsypBR{xA3Er7sgAi(|}1-W?s~n$7?K|9WL8kpVfw-;#b9 z+mn;=ep!162U5R>_t}fOt~tE?s#m( zO-S$7>Ay6*hHdZ)7_oU915WYYCIX;hFI-U2EWYX!pllONr@Q--2o~`!isi6vTPLJ4@(|o=%NHYjo0_S&q*UQIROw@*N-By@PaQ&;YxFZ0aR zX&}LeOEz);#m~Hwm^VAY8DK}b$F4bo{jMN?d!lxKPhNklzr^Cd`0f4oJr^z=I|l`* zm8AHm*fPV`0=lF3Pnnp}&J0N1X@}-D94YvmUabFrLGSnTz7Mu^21F#O5tN#CuY9Vh zUZBH=ez%h*wkf0hBtXJh1SN3d+IF{gzT7lp)j}n?03lt;XSQRAh7qd&v;RwTYDuQ# zbI2*r<>?x-G0@hM{;%{VBD7nLKt~D`T~-HAt5;h%i0_=Ifs=yHma5dhJ+QMG?Ux(a z|E?1CMy1!~oA`FP!k~iG=t&5#>bVdz=peT8HMB6Y)#7PpETtNryT^+Rv3vpJaF^zP z{H}0-LyV9Fu21ID%wO9f1IKlFr1p4c{o-?03vyB-tr5duk^&L$;m_|f$vs`^Sl{j2 z95}oY{LlY+=ZS%J+tZoXCd0*sSU7w^gjovXn+g7uyra5{cU49@yHf#Z^Jl-$9cIfo z+AJuxH$VLb=#+uBbVmUjnx zxb1pZ@-O9=AIk4@S)m6fJ2?{HrNYwwnL3a45muuNjr;6$O`bGEM0T4A2_S$t=86*- zcO+0mywg*j#A4mU}enR_!cGmIYQ;qwfchWtFEXL)AK%*;=j znYne+hS4EMy3S)C*mZ1KI>!+)0V@9!N6H$Y}~MJ{rYuf zz^KljIWvFi-?#?V@LPR&c6Nn{!=XM z>}-h$S76;$H{E{Y%@^zlmOl^efBwa%UU+jJD9UVukQ3ti_kH-?H*RC0?M1W%FCvMB zM_+v6fk$6X2sx)-p~B3&Kl{nscK}pNLM*qjtpaf9>AU{-iPKQZR8yCg!TY}Qg*(;) z)gdvCcB%kppZc$VdvsK@)3l1{&DG!d_6OHOS`y=ITLEVu`unSKA2E%JD*DVX{LJ}K z9l>hMRDqxQh0lnpGHpVYneX}eA3Pt|2v%=q;rt)``R|#bDyB)OXY&vI_@|*}h}G?^ z@aZ4_!7cQPX`!fW_?{oT1NTwHs#l5L-0`E|y@48<3Q^HFf8=Idi zpJYD%1MkII!~|7I^WGo)IF=?{>ACnjJ_WUi39C}!Q{QnheVJqeKKqq5^o5CBde(g9 zvw$X6^jz_^E2$wSw4!q5*RG(C2_^XO$HBn_55vbl44OnTTRwRaePP0vo{K)U1#99& z<>rq7V&V(<&@I%MFoN5zrY}sz=(*-L&}1QQ*a%`u25h{cFj===17eB_uGuzG&byQ< zrm8BJZl4r_E$3k|Wo6FW0-6M7>qac5uFQsQcmkLWGfeH74S3Z_rJ!jgN++!@i=HW8 zkyjI(oPH-+-N#Qc^-mpNO`bc6r=2-<%&Wy5K1vfFJB(L_IkpS6fY^NmuL8qsgj>MD zn~BHH9WM~32_3vd=W&B)k7F9q%stJx+b_L_X-4zr^LVUMCmyCTA3sWtkvsmME?Xiy z?xOSfB=_$oY06~J-HcCq&)qcW{j;uP;?Dm}=hkq?zh&n!;m((-G-u_t|6x399Q;>A zgNpxoJNj{u|MFDH7Rhq@FCAl0dE|ddnl!oh9{Lq?@JDoR6L;C941IK`ISfdE$4S zE0AUQ8+2|Ncl_q5QkSp#AODp~(^mfP&%Au@@|TBQwoP`UU+V{6u8|)6ZA{~uKmQ*M zmrMTDU8S~8Eqi{^v0Ug&5Upcm#y7Z1(RbgZAG8jB$eRwCspQ)>5;U)oGZ&E5aeR*K z8Yt`Y0$G))Yd(Y3KH}tA4`-_QmNke5hU_|nq=xtyjwW(_o?itz>B>WM&^63bNdQ)k@-IgDHW*RW$Xo9#RzrTrCn7L2H{9Amq|qNg@#eZY=|P zCoI?2s+L)zsM%WX(NbVEY^`C>lFjIBYmJ6@DKJ0ZT4&F&WHW!dwa%QzOG!?jY_2(S zDcEzZbz*2Q!43|z))9yOP9X1Xt%DXzwY(3tl-TR=Qb_MbZYRrooh;dYYmS!U_as1(=YVB?Q_A|tNu5Ut&_q3jbfDM zoFxT^uEuH`nX3*sB%K?GuHUkweYReBwnHqh3P)~`+s3+Tj!rDA1e)8vuBv5J*IsxC zkd^~b(aGzArj08{>cnzOuy04C+C`}gb|Yz-1avxeWzev3NzcHbz_&4W@QCr$z3~w=8Ua- z`;vfG1~BP8CyLb=F7t1am~ph_#|O%$khSJ9%Vtcn)YmpgQxF?xM^_Vb+5fnpB^W0I`f%X8gb9#X{Q-yJG0{Z56aWeI&zPxnf5pdJA38bM`cYnS#x)% z`n1tFf$i)W-hGm(f9mde^=X@NcV_lFb=P`4&CI&H=IArijGwdCk&X@uQ$5xmj!~^? z#$ROCI)V-~t%L%GS#wo@U27ddR`4`3)WoB{R-4snfNrfee|kI8^bu#yDgYqOwas9# zmcb`3!kRJ`Cr=_tq)8aMt{aGtUZsqwVlj6DgCGre>AEt&x8H_in!x@uwgExIh|-mA zjdaC(29~CTVSaaF7HPbql&*9Uo8P@f)>LqCXclr}peS7_1BQ28u9PO8Eq1@`l3q9o zkfKCaO2?T?ZyA6loW<#9_c^O=m<&h}CA!ineAD@=(gbq`vyT|tiJ6#^B1$P;;qax` z55k&Q?wEh#87niLo*+n4L@65J(Nz~=Ya%7^(miLb(E>A3B@|Jjl;FU&D>o|9#7PJH z?|ago!o;WC^h=|T7PVBg(DAB}72cyUS zb(f>Bwbr!F1eTCO5fpj<{PqhY5>143p?~5ZA5H40);=@M#MYvrB6gqHbU_!GSY??i z%s=>-ciA4*zOOZHds0a(kWewZ4h(k8h(ua7HX)Au&mY~H8KY6(_cb$_&fA@QjIW-*heP3%$d!m5^AdnT}`12qA^c@!g3DOwZ5WwE2?)-yU z!)Vx#Mtxt?FzFTwK!77sy7)sMzUd->w4^bxtpM2j!b1pjgyk zGKwWGeb4)^zjy{9Es&PU1}gwg?|J#L$KJB7ett9@4M%-nGtIQr0>Fl@8-yh`-+1ed zS6r}(MeSvgSoFmH*_WPu@i?}!AB~2?;i&IxrkNg~cQ9Som98tcq)k^|eeER|Zl77t za-TVUc;DNvzVXJ%w52+#weN?+;i#{f#!Oc&z?81*N>^e~ltRS%ZI@lR{rs()HmqG! zx*}ZrI-EZ}ckJMiy>A^oofwDfC~IH)z8{VHKGT@#E5I(Ll&+MnMCl>~AV7+>Gi%mF zkU1QlKASdR0B80!YhP<$Ywi0?W2Ux45oPfxv9QolWzJPD^weBfvo4SONxP35106sAmh(e+vAs0GboFD@PvNs)jNPvarhW}0YliZEg{Gazv z+JDIpoojRVPr<*C|BTq<`6ga{5q^8^!|0cxe=rZ!zxH3%f5ZO0cQ*Z<^$Yt2{|Ek0 zyT|*F+CO@K;(owBKtGg!S^xj-Z~rga2m6nxKl9J=fBSuNKW_dLKWhJKeg^-Xe`^1? z`TyJj)8E!#>_3Y?uKrwqq3LJ#SGU>AzUO|6`nR^u&3FNN_jGOc zw)Nw`wr3yIKhgcee6IaN=ws>M{6677%)hPwx&HzC(f&u~&)6@b2kNRzBDQAP0*H73 zq%McOmRk{B3i47qRe=DA*$&odrbEJZ*pV9XXa&p@wlW~@Yfs>V{yiTtplMhgM*-Bz zsSnlq&pG;z0OUN%$~$3=g1UF+G*>+17eRbBf3=y79J}KR8owon@$1Z7MIrvvWWH)34nK2SD)GsrJ{l z1Cl#oVo3A8qY3e=aF)qzms~FG#2$LzT=gs&aVMOj>(%{y<&O0cG!nCiESl~x=^dF{ zKvj8F1K8Ng171wwM5Fh4KoQw`_c6#y$(5cAm7e}~nJ#A*fx+c9;y#&W!#VukR)ugk zKp3=+;Ut+IYn%m+r4d*<`L2h%aDnX5}^!5R|H;(34AoVWjRx(msBZvk;rCI*|~ zdOijqI@9Z{Vu!~jvHW{lBa$rnl4+!s_5sfK3bCGk-B%iDe&@-}+%fOKU|(9?V1 zHE8&@4z)Kx!RAvAs z!Wic9=o#(bg?kc-G68-m(jZ`^=XGUXb)}t(%&~sjFnV^sEX%hSy6UKC4iOhgV=BHV z2w`4g7Y=s#Vu2B_?#VQ|hP39@eArgfX>-0S+dd&^mx0*wp}>)x;c4RUgxz%;oNe?& z-7-lJ@Y^2^C;=qJsxx5|xF)*pTGhch2B&kxtn;f!7=gznk}I3}Dh}(CoMXgA5-p&kS202!l?!fT3t|HG*rIP~mS* z$Wjo}jq3}z$Qq!9yrtd3fM0N629ZM?LU$nv@Tv9b7I;D|;0H2dsA~g7Z7zp1| zB)XmrkMgF6OQr|R)HHD^TE{Y#j!~SR?b`Xt3Qs`B+x<hxexYeAjMUWdZ-*n9%(1)Wb(n2U<><7&9dwGJmrob)4%H? zlQ%z+L-^$dFhhH|@u$%97Qz?*Ynh2VG@q|?8vY&L74&fs&_b&3$x&Oyjl~LQDRRap zJU4U*R+(2Dd!G+lh8!V{pT_UJn+^1Qg6$` zqkNm(a#hWyc6SP+p5=C4HL8-m`pO`5o~`-LI?_h5CsH?F_%?nDodmz&pWR20WTpJE z?N|wSzLjMUK8E)a2tI}Lf;+;*M|h3Y(U#>)g1>zk9|Hd}oZAa2 zLYBWBoSW!Ts!RwXr^8h+U*@{9{zqS^iH)Op<;r`Uw~nc}<^$V~_i%$GFjaG?X1@E|M`h)nekvFKt`Dh-f>@|0-`Xoq)o` zx;JmzDfOV9qCx|EVpogEe0LK~tGS?5$$L_i6P$P6wIsCQaP_;d{{N=iV@+8LI}o#( zvo*Ejy=IIn{rdIQh1&q-{EuohpVOjJ^Q3lD*YTp37$^RRgn8ihpdu5{Ct%5-KO!VL zcNB6dUajXI9jkm-P|i3~GB-A(X`P1Oqqb$tcku)UJw0w3GeUijb__#QT4j%64z%EeB7S?jlWwx_7&+EEvB|6N=kV}DwnyAlX=?j`) zmU#!$*^@NIu#n_d7;WoJV@*Fbv9|yJO4;n|BNF2xy(54RyB>t~8lUOUW$&2%Nwi1y zx6JxW88>U2$#qhl^6KUbtmg9}D0o5vYDT7kWJthLGkpGnN4T>{St^_EU>4;DmLF9o zr|LqsA8_MoNLQ=}w?8u!ziSZ@PC#Y<#9uJFo-ozVo6D;<8j^1$c|qAE3ZTE5i~zmE z$BU5lw6l=EWsg^y^;8>r9qH{xfL|~PZYK#md$zZ0?o11gV<*WSW~cgy2GYGQir%wf zt4iW8D+;s*;RGrmd(-T<@2&j(Cb9xhV*l-x`TpK`xq|7p?5R%5*s!69?2c!cC*VY* z2DE^9pvOPLU!1e}wA8S8opcTJ3`NB>hY=JQnL~QFXR4K8A$BqJnoEB$wn-%u@E6Mh zCfMF4kusv3N!(aHC}4)Xs^xoOwXd%e^6pi5|DZo=Q25j+6HlJ^7FodH6y1bMROR^q zGu6)fopS`h%Sw<;ZH%TEPf+#81-#_v+@8nlR0jLcIDKQtLleOC)6yLZgC!D9X3GgS zohwU{v$jl=quD#Go^hB{`@Qw*a%`(^jyT~=q^bWgGzRj;|12J55HWdCWV}EB|K=%N z3Nq-qxJJ`>^|1MNN+q}zTB&ooE3j==AgK@^UW<^oSbeALa2peF)Th6{@sj0KyMNHZ zksk1+MXN2tv+22A%cQOGpS9)77(uP9mh+!5T5ERLvF@b}$+WvXM45Z?-kCa)fb~f1 znVbTD$Gx-0Zxc`0D@YgHakge6SL0H`-vN_x?AP0>iGH0_EE&=v83hMJgaKAI0jJXm zVxVz;X<$v6WW7}fxROO7vr#YLP;;lij5VrX{;>7kK6TtOH&6|Ar^xo>00%+u$C4@# z>!jOt6*3><171+WxoZnKDTzJtDRw+T030;yI}~uV@9fCnei^I*j>Bp&mzP2d=FPb_ zCM*l_+$LDR3B*a!A$g#>xsrZvw0lckxmMg>0aQd7tPyN=t{dgXb;Ie+T8{fZH=gdu zM7Rg9c(kg(Jg0?ARRRl=AONFKrvFj)lTY$KfT%6^6s`mk*ABGhsce*LsoD>K{z_M2 ziPpnu+lw22PfF!CoId^6n*G4H(Ix+#+N{C(da7t1BYMGEaE#PdpOLxsVD5riQXHp@OX;`S`8VnpM~)I920w~<3|mo0 zf8~Az`*?2?H&gZ&*K&bRkV@qzvMlRHXys8*Ze2+1c?5o!^+$&MHxB@4Ee5cke52R! zmn7AZtY6ST%ixgU5)%$%QcwHj7Es-Qu^kLAPwy%7pGBw_4Q9#da^W2$}axNHr03)_nw z5?yuNmXrI5HgS46)c5&}B)Tts49oU92>3xBLLy}FMUW=84DQbVq^;7_e7|(Sdz|&J z73N+M`rc2rt*oSWu#7S{*s~nH6HRHJS1SmzeXk|;CA)FI4bat3<%}nkB%;;?=F>B7ms9QSxv#@+69;@>QaR?REYX4&)=itG>rM{<{A79Rmk)`5ON#GL`*KX%}Ihk3w(RtM-WLt z?f&FLF}4N^yE!(pZ&Yj&Bc`~K0@4_}*0Om?wN|}4WJ>WL;G^H2*QpgEkGA~OET-Km zkwz|5{6dnz1U<2Pe9DNL>3g5FEIvp1jzP&2K#z~j%g6!7B;^zF+o95?fV{3mnB8*RMhCDNp>Am-3e@jNfMj?jHV$MWjk!DDKP zkAz$Y?Sr)!GUOX}qTQ5aMh|wq1uq}~joWyKl=b_LboM#wi{CMuz5x6BKlA-qy++cM01D3b7`uD z#l6M4pI;JCypO8JZ6?U&wNxR!{4oB_ zlV!x9+-&Qy6{%MQ{~yoZGkKiTSC`YS_j22~G;xUV855g2&C(zm^V!(wpcm@zn{%!g z4}JGo(sGZ1O~to-}le

UmY2RIYtNPVDpE$%vda+HD#3m z&VuXJ{BK&Qe+rBa7eq}Q(bq|tn(RrJAk|ztj2(i{d>nmQnM?;HF2k&9sA6up5tmjl z7lySlzMbifH17-m-Lwa_F&e7nOH?ESi3#ckR3tsM+jsck3`oG!uMS}|eAwVXv>}qxwq?QY%QJ0}r@^;fhuUA9W z*BVl>TGo&N004@xSiwDUXUvp51sVmqO3m)=B55aPwf@0=e}cN+$-BdKxY`YrT_4)0 z_d10#i44Q*rFr8MC>*)v$EJvz``(pb{e&*6k+b zsMz%($|1+8hn8c2?P(l@;Rb&CsZeYoCI3?2!LqjbwPXW3z4G$Qfj=cT5Yb%vY0(AX oeb?AaKtwrnc|$|zzw9vfvn^aJJ!zd)XFXqqy0000001=f@-~a#s diff --git a/generativeai-android-sample/app/src/main/res/values/colors.xml b/generativeai-android-sample/app/src/main/res/values/colors.xml deleted file mode 100644 index ef8476ee..00000000 --- a/generativeai-android-sample/app/src/main/res/values/colors.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - #FFBB86FC - #FF6200EE - #FF3700B3 - #FF03DAC5 - #FF018786 - #FF000000 - #FFFFFFFF - \ No newline at end of file diff --git a/generativeai-android-sample/app/src/main/res/values/strings.xml b/generativeai-android-sample/app/src/main/res/values/strings.xml deleted file mode 100644 index e00586b4..00000000 --- a/generativeai-android-sample/app/src/main/res/values/strings.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - Generative AI Sample App - Go - Try it - - - Generate text from text-only input - Sample app that summarizes text - Generate text from text-and-image input (multimodal) - Sample app for uploading images and asking about them - Build multi-turn conversations (chat) - Sample app demonstrating a conversational UI - - - Text - Enter text to summarize - - - Question - Upload an image and then ask a question - Add Image - - - Message - Send - diff --git a/generativeai-android-sample/app/src/main/res/values/themes.xml b/generativeai-android-sample/app/src/main/res/values/themes.xml deleted file mode 100644 index d423efff..00000000 --- a/generativeai-android-sample/app/src/main/res/values/themes.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - -