GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — Gemini | ADK for TypeScript: API Reference - v2.5.0

  • Gemini

Class Gemini

Integration for Gemini models.

Hierarchy (View Summary)

  • BaseLlm
    • Gemini
      • ApigeeLlm
  • Defined in core/src/models/google_llm.ts:87

Constructors

constructor

  • new Gemini(params: GeminiParams): Gemini

    Parameters

    • params: GeminiParams

      The parameters for creating a Gemini instance.

    Returns Gemini

    Overrides BaseLlm.constructor

    • Defined in core/src/models/google_llm.ts:99

Properties

Readonly[BASE_MODEL_SYMBOL]

"[BASE_MODEL_SYMBOL]": true

A unique symbol to identify BaseLlm classes.

Inherited from BaseLlm.[BASE_MODEL_SYMBOL]

  • Defined in core/src/models/base_llm.ts:40

Readonly[GEMINI_MODEL_SYMBOL]

"[GEMINI_MODEL_SYMBOL]": true
  • Defined in core/src/models/google_llm.ts:88

Readonlymodel

model: string

Inherited from BaseLlm.model

  • Defined in core/src/models/base_llm.ts:42

ReadonlyuseInteractionsApi

useInteractionsApi: boolean
  • Defined in core/src/models/google_llm.ts:94

Protected Readonlyvertexai

vertexai: boolean
  • Defined in core/src/models/google_llm.ts:90

Static ReadonlysupportedModels

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 core/src/models/google_llm.ts:139

Accessors

apiBackend

  • get apiBackend(): GoogleLLMVariant

    Returns GoogleLLMVariant

    • Defined in core/src/models/google_llm.ts:247

apiClient

  • get apiClient(): GoogleGenAI

    Returns GoogleGenAI

    • Defined in core/src/models/google_llm.ts:225

liveApiClient

  • get liveApiClient(): GoogleGenAI

    Returns GoogleGenAI

    • Defined in core/src/models/google_llm.ts:272

liveApiVersion

  • get liveApiVersion(): string

    Returns string

    • Defined in core/src/models/google_llm.ts:256

ProtectedtrackingHeaders

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

    Returns Record<string, string>

    Inherited from BaseLlm.trackingHeaders

    • Defined in core/src/models/base_llm.ts:81

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 core/src/models/google_llm.ts:298

generateContentAsync

  • generateContentAsync(
        llmRequest: LlmRequest,
        stream?: boolean,
        abortSignal?: AbortSignal,
    ): AsyncGenerator<LlmResponse, void>

    Sends a request to the Gemini model.

    Parameters

    • llmRequest: LlmRequest

      The request to send to the Gemini model.

    • stream: boolean = false

      Whether to make a streaming call. Defaults to false.

    • OptionalabortSignal: AbortSignal

    Returns AsyncGenerator<LlmResponse, void>

    Yields

    Each LlmResponse produced by the model. A non-streaming call yields exactly one; a streaming call yields the partial responses as they arrive, then a final aggregated response whenever the stream carried either content or usage/grounding/citation metadata. A metadata-only stream therefore still ends with one, holding the metadata and no content; only a stream with neither ends silently.

    Overrides BaseLlm.generateContentAsync

    • Defined in core/src/models/google_llm.ts:165

ProtectedgetHttpOptions

  • getHttpOptions(): HttpOptions

    Returns HttpOptions

    • Defined in core/src/models/google_llm.ts:221

ProtectedgetLiveHttpOptions

  • getLiveHttpOptions(): HttpOptions

    Returns HttpOptions

    • Defined in core/src/models/google_llm.ts:265

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 core/src/models/base_llm.ts:90
Constructors
constructor
Properties
[BASE_MODEL_SYMBOL][GEMINI_MODEL_SYMBOL]modeluseInteractionsApivertexaisupportedModels
Accessors
apiBackendapiClientliveApiClientliveApiVersiontrackingHeaders
Methods
connectgenerateContentAsyncgetHttpOptionsgetLiveHttpOptionsmaybeAppendUserContent
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.