Builder

class Builder

Fluent builder for Gemini, provided primarily for Java callers. Any property left unset falls back to the same default as the constructor.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Sets the Google AI API key; set at most one of this, client, and vertexCredentials.

Link copied to clipboard
fun build(): Gemini

Builds the Gemini model, using a Google AI API key unless a client or Vertex AI credentials are set.

Link copied to clipboard
fun client(client: Client?): Gemini.Builder

Sets the SDK client; set at most one of this, apiKey, and vertexCredentials.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Sets the Vertex AI credentials; set at most one of this, client, and apiKey.