UNPKG

ai

Version:

AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.

27 lines (18 loc) 688 B
--- title: AI_NoTranslationGeneratedError description: Learn how to fix AI_NoTranslationGeneratedError --- # AI_NoTranslationGeneratedError This error occurs when no translation could be generated from the input audio: no `audio` part was emitted and the final output text is empty, or the stream ended without a finish event. ## Properties - `response`: Speech translation model response metadata (required in constructor) ## Checking for this Error You can check if an error is an instance of `AI_NoTranslationGeneratedError` using: ```typescript import { NoTranslationGeneratedError } from 'ai'; if (NoTranslationGeneratedError.isInstance(error)) { // Handle the error } ```