Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Generate text and images via the reverse-engineered Gemini Web API with multi-turn conversation support.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
scripts/gemini-webapi/types/modeloutput.ts
1import type { Image } from './image.js';2import type { Candidate } from './candidate.js';34export class ModelOutput {5public metadata: string[];6public candidates: Candidate[];7public chosen: number;89constructor(params: { metadata: string[]; candidates: Candidate[]; chosen?: number }) {10this.metadata = params.metadata;11this.candidates = params.candidates;12this.chosen = params.chosen ?? 0;13}1415toString(): string {16return this.text;17}1819get text(): string {20return this.candidates[this.chosen]?.text ?? '';21}2223get thoughts(): string | null {24return this.candidates[this.chosen]?.thoughts ?? null;25}2627get images(): Image[] {28return this.candidates[this.chosen]?.images ?? [];29}3031get rcid(): string {32return this.candidates[this.chosen]?.rcid ?? '';33}34}3536