Documentation
    Preparing search index...

    AI Adapter implementation for Google's Gemini models using the official genai SDK.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _ai: GoogleGenAI | null = null
    _apiKey: string

    Methods

    • Instructs the Gemini model to output structured JSON data conforming to a given schema.

      Parameters

      • prompt: any

        The instruction or context.

      • schema: any

        The expected JSON schema structure.

      • Optionaloptions: any

        Additional options including the model identifier.

      Returns Promise<any>

      The parsed JSON object returned by the model.

      If the API does not return valid text.

    • Sends a textual prompt to the Gemini API and retrieves the generated text response.

      Parameters

      • prompt: string

        The instruction or query to send to the model.

      • Optionaloptions: any

        Configuration options. Can include a model string identifier.

      Returns Promise<string>

      The generated response string.

    • Sends a textual prompt to the Gemini API and returns an async iterable of text chunks.

      Parameters

      • prompt: string

        The instruction or query to send to the model.

      • Optionaloptions: any

        Configuration options including the model identifier.

      Returns Promise<AsyncIterable<string, any, any>>

      An async iterable stream of text chunks.

    • Initializes the internal GoogleGenAI client with the provided API key.

      Returns void