Package-level declarations

Types

Link copied to clipboard
class Batch(apiKey: String, client: HttpClient? = null)

Client for interacting with the Gemini Batch API.

Link copied to clipboard
@Serializable
data class BatchConfig(val displayName: String? = null, val inputConfig: BatchInputConfig)

Represents the configuration for a batch job.

Link copied to clipboard

Represents the batch config builder.

Link copied to clipboard
@Serializable
data class BatchGcsSource(val uris: List<String>)

Represents a Google Cloud Storage source.

Link copied to clipboard
@Serializable
data class BatchInlineResponse(val response: GenerateContentResponse? = null, val error: JsonElement? = null, val metadata: ResponseMetadata? = null)

Represents a single inline response in a batch job result.

Link copied to clipboard
@Serializable
data class BatchInputConfig(val gcsSource: BatchGcsSource? = null, val fileName: String? = null, val requests: BatchRequestInput? = null)

Represents the input configuration for a batch job.

Link copied to clipboard

Represents the batch input config builder.

Link copied to clipboard
@Serializable
data class BatchItemRequest(val request: JsonElement, val metadata: ResponseMetadata? = null)

Represents a single request within a batch.

Link copied to clipboard

Represents the batch item request builder.

Link copied to clipboard
@Serializable
data class BatchJob(val name: String, val metadata: BatchJobMetadata? = null, val done: Boolean? = null, val error: GeminiError? = null, val response: BatchJobResponse? = null)

Represents the response from a batch job creation or retrieval. This corresponds to the Operation resource in the API.

Link copied to clipboard
@Serializable
data class BatchJobMetadata(val model: String? = null, val displayName: String? = null, val output: BatchOutput? = null, val createTime: String? = null, val endTime: String? = null, val updateTime: String? = null, val batchStats: BatchStats? = null, val state: String? = null, val name: String? = null)

Metadata for a batch job.

Link copied to clipboard
@Serializable
data class BatchJobResponse(val inlinedResponses: InlinedResponsesWrapper? = null)

The response payload of a completed batch job.

Link copied to clipboard
@Serializable
data class BatchOutput(val inlinedResponses: InlinedResponsesWrapper? = null)

The output of the batch job.

Link copied to clipboard
@Serializable
data class BatchRequestInput(val requests: List<BatchItemRequest>)

Represents inline requests for a batch job.

Link copied to clipboard

Represents the batch request input builder.

Link copied to clipboard
@Serializable
data class BatchStats(val requestCount: Int? = null, val successfulRequestCount: Int? = null)

Stats about the batch.

Link copied to clipboard
@Serializable
data class CreateBatchRequest(val batch: BatchConfig)

Represents a request to create a batch job.

Link copied to clipboard

Represents the create batch request builder.

Link copied to clipboard
@Serializable
data class InlinedResponsesWrapper(val inlinedResponses: List<BatchInlineResponse>? = null)

Wrapper for the list of inline responses.

Link copied to clipboard
@Serializable
data class ListBatchesResponse(val operations: List<BatchJob>? = null, val nextPageToken: String? = null)

Represents the response from listing batch jobs.

Link copied to clipboard
@Serializable
data class ResponseMetadata(val key: String? = null)

Optional metadata to identify the request.

Link copied to clipboard

Represents the response metadata builder.

Functions

Link copied to clipboard

A DSL for building BatchConfig objects.

Link copied to clipboard

A DSL for building BatchInputConfig objects.

Link copied to clipboard

A DSL for building BatchItemRequest objects.

Link copied to clipboard

A DSL for building BatchRequestInput objects.

Link copied to clipboard

A DSL for building CreateBatchRequest objects.

Link copied to clipboard

A DSL for building ResponseMetadata objects.