Package-level declarations

Types

Link copied to clipboard
data class CacheMetadata(val fingerprint: String, val contentsCount: Int, val cacheName: String? = null, val expireTime: Long? = null, val invocationsUsed: Int? = null, val createdAt: Long? = null)

Metadata for the context cache associated with LLM responses.

Link copied to clipboard
class Gemini(client: ERROR CLASS: Symbol not found for Client, val name: String, models: Gemini.GeminiModels = RealGeminiModels(client.models)) : Model

Implementation of Model that interacts with Google Gemini models using the GenAI SDK.

Link copied to clipboard
actual typealias GoogleCredentials = com.google.auth.oauth2.GoogleCredentials
typealias GoogleCredentials = com.google.auth.oauth2.GoogleCredentials

On JVM and Android, ADK credentials are the Java Auth Library's GoogleCredentials.

expect class GoogleCredentials

ADK-owned handle to Google Cloud credentials for Vertex AI (see VertexCredentials). On JVM and Android it is a typealias for com.google.auth.oauth2.GoogleCredentials; toGenaiSdk bridges it to the GenAI SDK.

Link copied to clipboard
data class LlmRequest(val model: Model? = null, val contents: List<Content> = emptyList(), val config: GenerateContentConfig = GenerateContentConfig(), toolsDict: List<BaseTool> = emptyList(), val cacheConfig: ContextCacheConfig? = null, val cacheMetadata: CacheMetadata? = null, val cacheableContentsTokenCount: Int? = null)

LlmRequest represents a request to an LLM.

Link copied to clipboard
data class LlmResponse(val content: Content? = null, val usageMetadata: UsageMetadata? = null, val finishReason: FinishReason? = null, val errorMessage: String? = null, val partial: Boolean = false, val interrupted: Boolean = false, val modelVersion: String? = null, val citationMetadata: CitationMetadata? = null, val groundingMetadata: GroundingMetadata? = null, val errorCode: String? = null, val customMetadata: Map<String, Any?>? = null, val avgLogprobs: Double? = null, val logprobsResult: LogprobsResult? = null, val cacheMetadata: CacheMetadata? = null)

LLM response class that provides the first candidate response from the model if available. Otherwise, contains the error code and message.

Link copied to clipboard
interface Model

Interface that provides a common interface for interacting with different LLMs.

Link copied to clipboard

Aggregates partial streaming responses into a single, cohesive response.

Link copied to clipboard
data class VertexCredentials(val project: String? = null, val location: String? = null, val credentials: GoogleCredentials? = null)

Config for authenticating to Vertex AI when constructing a Gemini model.