From 697b3424c7bd636716ed2b82b9c59b42aa14c1d0 Mon Sep 17 00:00:00 2001 From: Reynaldi Chernando <12949382+reynaldichernando@users.noreply.github.com> Date: Sat, 13 Dec 2025 03:55:20 +0700 Subject: [PATCH] Add missing AI types (#2151) --- src/puter-js/types/modules/ai.d.ts | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/puter-js/types/modules/ai.d.ts b/src/puter-js/types/modules/ai.d.ts index 71c736dea..9b54ce7a9 100644 --- a/src/puter-js/types/modules/ai.d.ts +++ b/src/puter-js/types/modules/ai.d.ts @@ -76,20 +76,34 @@ export interface Txt2ImgOptions { prompt_strength?: number; disable_safety_checker?: boolean; response_format?: string; + test_mode?: boolean; } export interface Txt2VidOptions { prompt?: string; + provider?: string; model?: string; - duration?: number; seconds?: number; + test_mode?: boolean; + + // OpenAI options + size?: string; + resolution?: string; + input_reference?: File; + + // TogetherAI options width?: number; height?: number; fps?: number; steps?: number; - driver?: string; - provider?: string; - service?: string; + guidance_scale?: number; + seed?: number; + output_format?: string; + output_quality?: number; + negative_prompt?: string; + reference_images?: string[]; + frame_images?: Array<{ input_image: string; frame: number }>; + metadata?: Record; } export interface Txt2SpeechOptions { @@ -103,6 +117,8 @@ export interface Txt2SpeechOptions { output_format?: string; instructions?: string; voice_settings?: Record; + ssml?: boolean; + test_mode?: boolean; } export interface Speech2TxtOptions { @@ -121,6 +137,7 @@ export interface Speech2TxtOptions { known_speaker_names?: string[]; known_speaker_references?: string[]; extra_body?: Record; + test_mode?: boolean; } export interface Speech2SpeechOptions { @@ -137,6 +154,7 @@ export interface Speech2SpeechOptions { outputFormat?: string; voice_settings?: Record; voiceSettings?: Record; + seed?: number; file_format?: string; fileFormat?: string; remove_background_noise?: boolean; @@ -145,6 +163,7 @@ export interface Speech2SpeechOptions { optimizeStreamingLatency?: number; enable_logging?: boolean; enableLogging?: boolean; + test_mode?: boolean; } export class AI {