Package-level declarations

Types

Link copied to clipboard
typealias Base64 = String
Link copied to clipboard
data class BlobContent(val mimeType: String, val data: Base64)
Link copied to clipboard
Link copied to clipboard
data class Candidate(val content: Content? = null, val finishReason: FinishReason? = null)
Link copied to clipboard
data class Content(val role: Role, val parts: List<Part> = emptyList())
Link copied to clipboard
class ErrorDetails(val code: Int, val message: String, val status: String)
Link copied to clipboard
data class ErrorResponse(val error: ErrorDetails)
Link copied to clipboard
data class FileDataContent(val mimeType: String, val fileUri: String)
Link copied to clipboard
Link copied to clipboard
data class FunctionCallContent(val name: String, val args: <Error class: unknown class>)
Link copied to clipboard
Link copied to clipboard
data class FunctionDeclaration(val name: String, val description: String, val parameters: <Error class: unknown class>?)
Link copied to clipboard
data class FunctionResponseContent(val name: String, val response: <Error class: unknown class>, val parts: List<FunctionResponsePart> = emptyList())
Link copied to clipboard
Link copied to clipboard
data class GenerateContentRequest(val contents: List<Content>, val tools: List<Tool>? = null, val generationConfig: GenerationConfig, var toolConfig: ToolConfig? = null, val systemInstruction: Content? = null, val safetySettings: List<SafetySettings> = emptyList())
Link copied to clipboard
data class GenerateContentResponse(val candidates: List<Candidate>? = null, val promptFeedback: PromptFeedback? = null, val usageMetadata: UsageMetadata? = null)
Link copied to clipboard
data class GenerationConfig(val temperature: Float? = null, val topP: Float? = null, val topK: Int? = null, val candidateCount: Int? = null, val maxOutputTokens: Int? = null, val stopSequences: List<String>? = null, val responseMimeType: String? = null, val presencePenalty: Float? = null, val frequencyPenalty: Float? = null, val thinkingConfig: ThinkingConfig? = null, val responseSchema: <Error class: unknown class>? = null)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class MediaResolution(val level: MediaResolutionLevel)
Link copied to clipboard
interface Part
Link copied to clipboard
Link copied to clipboard
data class PromptFeedback(val blockReason: BlockReason? = null, val safetyRatings: List<SafetyRating>? = null)
Link copied to clipboard
value class Role(val value: String)
Link copied to clipboard
data class SafetyRating(val category: HarmCategory, val probability: HarmProbability, val blocked: Boolean)
Link copied to clipboard
data class SafetySettings(val category: HarmCategory, val threshold: HarmBlockThreshold)
Link copied to clipboard
data class Schema(val type: String, val description: String? = null, val format: String? = null, val enum: List<String>? = null, val properties: Map<String, Schema>? = null, val required: List<String>? = null, val items: Schema? = null)
Link copied to clipboard
data class ThinkingConfig(val thinkingBudget: Int? = null, val thinkingLevel: String? = null)
Link copied to clipboard
class Tool(val functionDeclarations: List<FunctionDeclaration>)
Link copied to clipboard
data class ToolConfig(val functionCallingConfig: FunctionCallingConfig)
Link copied to clipboard
data class UsageMetadata(val promptTokenCount: Int? = null, val candidatesTokenCount: Int? = null, val totalTokenCount: Int? = null, val thoughtsTokenCount: Int? = null, val cachedContentTokenCount: Int? = null)