# Class Gemini

Integration for Gemini models.

#### Hierarchy (View Summary)

- BaseLlm
  - Gemini
    - ApigeeLlm

- Defined in models/google_llm.ts:63

## Constructors

### constructor

- new Gemini(params: GeminiParams): Gemini

  #### Parameters

  - params: GeminiParams

    The parameters for creating a Gemini instance.

  #### Returns Gemini

  Overrides BaseLlm.constructor

  - Defined in models/google_llm.ts:73

## Properties

### `Readonly`[BASE_MODEL_SYMBOL]

"[BASE_MODEL_SYMBOL]": true

A unique symbol to identify BaseLlm classes.

Inherited from BaseLlm.[BASE_MODEL_SYMBOL]

- Defined in models/base_llm.ts:40

### `Readonly` model

model: string

Inherited from BaseLlm.model

- Defined in models/base_llm.ts:42

### `Protected` `Readonly` vertexai

vertexai: boolean

- Defined in models/google_llm.ts:65

### `Static` `Readonly` supportedModels

supportedModels: (string | RegExp)[] = ...

A list of model name patterns that are supported by this LLM.

#### Returns

A list of supported models.

Overrides BaseLlm.supportedModels

- Defined in models/google_llm.ts:111

## Accessors

### apiBackend

- get apiBackend(): GoogleLLMVariant

  #### Returns GoogleLLMVariant

  - Defined in models/google_llm.ts:252

### apiClient

- get apiClient(): GoogleGenAI

  #### Returns GoogleGenAI

  - Defined in models/google_llm.ts:231

### liveApiClient

- get liveApiClient(): GoogleGenAI

  #### Returns GoogleGenAI

  - Defined in models/google_llm.ts:276

### liveApiVersion

- get liveApiVersion(): string

  #### Returns string

  - Defined in models/google_llm.ts:261

### `Protected` trackingHeaders

- get trackingHeaders(): Record<string, string>

  #### Returns Record<string, string>

  Inherited from BaseLlm.trackingHeaders

  - Defined in models/base_llm.ts:80

## Methods

### connect

- connect(llmRequest: LlmRequest): Promise<BaseLlmConnection>

  Connects to the Gemini model and returns an llm connection.

  #### Parameters

  - llmRequest: LlmRequest

    LlmRequest, the request to send to the Gemini model.

  #### Returns Promise<BaseLlmConnection>

  BaseLlmConnection, the connection to the Gemini model.

  Overrides BaseLlm.connect

  - Defined in models/google_llm.ts:292

### generateContentAsync

- generateContentAsync(
  llmRequest: LlmRequest,
  stream?: boolean,
  ): AsyncGenerator<LlmResponse, void>

  Sends a request to the Gemini model.

  #### Parameters

  - llmRequest: LlmRequest

    LlmRequest, the request to send to the Gemini model.

  - stream: boolean = false

    bool = false, whether to do streaming call.

  #### Returns AsyncGenerator<LlmResponse, void>

  #### Yields

  LlmResponse: The model response.

  Overrides BaseLlm.generateContentAsync

  - Defined in models/google_llm.ts:132

### `Protected` getHttpOptions

- getHttpOptions(): HttpOptions

  #### Returns HttpOptions

  - Defined in models/google_llm.ts:227

### `Protected` getLiveHttpOptions

- getLiveHttpOptions(): HttpOptions

  #### Returns HttpOptions

  - Defined in models/google_llm.ts:269

### maybeAppendUserContent

- maybeAppendUserContent(llmRequest: LlmRequest): void

  Appends a user content, so that model can continue to output.

  #### Parameters

  - llmRequest: LlmRequest

    LlmRequest, the request to send to the LLM.

  #### Returns void

  Inherited from BaseLlm.maybeAppendUserContent

  - Defined in models/base_llm.ts:94