ADK for TypeScript: API Reference
    Preparing search index...

    Class Gemini

    Integration for Gemini models.

    Hierarchy (View Summary)

    Constructors

    Properties

    "[BASE_MODEL_SYMBOL]": true

    A unique symbol to identify BaseLlm classes.

    "[GEMINI_MODEL_SYMBOL]": true
    model: string
    useInteractionsApi: boolean
    vertexai: boolean
    supportedModels: (string | RegExp)[] = ...

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

    A list of supported models.

    Accessors

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

      Returns Record<string, string>

    Methods

    • 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>

      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.