class

AI::Provider::InvalidPromptError

Inherits AI::Provider::AISDKError < Exception < Reference < Object

Error thrown when a prompt is invalid.

This error should be thrown by providers when they cannot process a prompt due to structural or content issues.

Constructors

new(*, prompt, message : String, cause : Exception | Nil = nil)

Creates a new InvalidPromptError.

Parameters:

  • prompt: The invalid prompt value (any type)
  • message: Description of why the prompt is invalid
  • cause: Optional underlying exception
Source

Class methods

instance?(error) : Bool

Checks if the given value is an instance of InvalidPromptError.

Source

Instance methods

prompt

The invalid prompt value. Stored as JSON::Any to handle any type.

Source