title | description |
---|---|
AI_InvalidPromptError |
Learn how to fix AI_InvalidPromptError |
This error occurs when the prompt provided is invalid.
prompt
: The invalid prompt valuemessage
: The error messagecause
: The cause of the error
You can check if an error is an instance of AI_InvalidPromptError
using:
import { InvalidPromptError } from 'ai';
if (InvalidPromptError.isInstance(error)) {
// Handle the error
}