Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
data class Candidate(val content: Content, val finishReason: String? = null, val safetyRatings: List<SafetyRating>? = null)
Represents a candidate response from the model.
Link copied to clipboard
data class GenerateContentRequest(val contents: List<Content>, val model: String? = null, val generationConfig: GenerationConfig? = null, val safetySettings: List<SafetySetting>? = null, val tools: List<Tool>? = null, val systemInstruction: Content? = null)
Link copied to clipboard
data class GenerateContentResponse(val candidates: List<Candidate>, val promptFeedback: PromptFeedback? = null, val usageMetadata: UsageMetadata? = null, val modelVersion: String, val responseId: String? = null)
Represents a response from the Gemini API.
Link copied to clipboard
data class GenerationConfig(val temperature: Double? = null, val topP: Double? = null, val topK: Float? = null, val candidateCount: Int? = null, val maxOutputTokens: Int? = null, val stopSequences: List<String>? = null, val responseMimeType: String? = null, val responseSchema: Schema? = null, val responseModalities: List<Modality>? = null, val seed: Int? = null, val presencePenalty: Double? = null, val frequencyPenalty: Double? = null, val responseLogprobs: Boolean? = null, val logprobs: Int? = null, val enableEnhancedCivicAnswers: Boolean? = null, val speechConfig: SpeechConfig? = null, val thinkingConfig: ThinkingConfig? = null, val mediaResolution: MediaResolution? = null)
Configuration options for text generation.
Link copied to clipboard
Threshold levels for blocking harmful content.
Link copied to clipboard
Probability levels for harmful content.
Link copied to clipboard
Resolution for media generation.
Link copied to clipboard
Mock implementation of Google Gemini API for testing purposes.
Link copied to clipboard
Modality for the response.
Link copied to clipboard
https://ai.google.dev/api/generate-content#v1beta.ModalityTokenCount
Link copied to clipboard
Represents a part of the content, which can be text or other media.
Link copied to clipboard
data class PromptFeedback(val blockReason: BlockReason? = null, val safetyRatings: List<SafetyRating>? = null)
Represents feedback related to the prompt.
Link copied to clipboard
Categories for safety settings.
Link copied to clipboard
Represents a safety rating for content.
Link copied to clipboard
Settings to control the safety of generated content.
Link copied to clipboard
Configuration for speech generation.
Link copied to clipboard
Configuration for thinking.
Link copied to clipboard
Represents a tool that the model may call.
Link copied to clipboard
data class UsageMetadata(val promptTokenCount: Int? = null, val cachedContentTokenCount: Int? = null, val candidatesTokenCount: Int? = null, val toolUsePromptTokenCount: Int? = null, val thoughtsTokenCount: Int? = null, val totalTokenCount: Int? = null, val promptTokensDetails: List<ModalityTokenCount>? = null, val cacheTokensDetails: List<ModalityTokenCount>? = null, val candidatesTokensDetails: List<ModalityTokenCount>? = null, val toolUsePromptTokensDetails: List<ModalityTokenCount>? = null)