Creative Analyzer - v0.0.1
    Preparing search index...

    Module adapters/gemini

    Adapter — Gemini Files API + generateContent client.

    Converts a DriveFile (bytes + MIME from the Drive adapter) into a validated AnalyzeResponse using:

    1. POST /upload/v1beta/files — upload bytes, get a file URI and state.
    2. GET /v1beta/{file.name} — poll until state === 'ACTIVE' (video only).
    3. POST /v1beta/models/{model}:generateContent — structured JSON response.

    Single source of truth: PERSON_FIELDS (in the domain layer) drives the Gemini responseSchema produced here, the Zod schema validated against, and the SYSTEM_INSTRUCTION prompt.

    Classes

    GeminiError

    Variables

    geminiResponseSchema

    Functions

    analyzeWithGemini
    safeReadText
    mapUpstreamStatus