v0.130.0
Changed
-
breaking change: updated
generateTranscription
interface. The function now takes amimeType
andaudioData
(base64-encoded string,Uint8Array
,Buffer
orArrayBuffer
). Example:import { generateTranscription, openai } from "modelfusion"; import fs from "node:fs"; const transcription = await generateTranscription({ model: openai.Transcriber({ model: "whisper-1" }), mimeType: "audio/mp3", audioData: await fs.promises.readFile("data/test.mp3"), });
-
Images in instruction and chat prompts can be
Buffer
orArrayBuffer
instances (in addition to base64-encoded strings andUint8Array
instances).