Package-level declarations

Types

Link copied to clipboard
@Serializable
data class ErrorResponse(val error: ErrorResponse.ErrorContent)

TODO use in toDomainError

Link copied to clipboard
class GeminiApiEndpoints(val apiKey: String)

The Gemini HTTP endpoints used to send prompts. It also includes the headers used and details about the HTTP API. Each Endpoint must belong to a Resource, which defines a path for specific functionalities or use-cases. version is used before the resource paths

Link copied to clipboard

Provides a clean interface for making HTTP calls to the GeminiApiEndpoints using a KtorClient and handles Data Structure (DS) conversions between domain and HTTP bodies. The methods receive DSs from data.domains.gemini, and use DSs from data.sources.cloud.gemini to use with KtorClient and then converts them back to DS from data.domains.gemini See "gemini test2.sh" in docs/gemini-api-curl-test for reference.

Link copied to clipboard
@Serializable
data class GenerateContentRequest(val contents: List<GenerateContentRequest.Content>)

https://ai.google.dev/api/generate-content#request-body

Link copied to clipboard
@Serializable
data class GenerateContentResponse(val candidates: List<GenerateContentResponse.Candidate>, val usageMetadata: GenerateContentResponse.UsageMetadata, val modelVersion: String)

https://ai.google.dev/api/generate-content#v1beta.GenerateContentResponse

Link copied to clipboard
enum MimeType(val value: String) : Enum<MimeType>

https://ai.google.dev/gemini-api/docs/vision?lang=rest#technical-details-image

Properties

Link copied to clipboard

The link to get an Gemini API key