class AI::Provider::NoContentGeneratedError

Overview

Error thrown when the AI provider fails to generate any content.

This error indicates that the model completed its response but did not produce any usable content.

Defined in:

ai/provider/errors/no_content_generated_error.cr

Constructors

Class Method Summary

Instance methods inherited from class AI::Provider::AISDKError

name : String name, to_s(io : IO) : Nil to_s

Constructor methods inherited from class AI::Provider::AISDKError

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

Class methods inherited from class AI::Provider::AISDKError

instance?(error) : Bool instance?

Constructor Detail

def self.new(*, message : String = "No content generated.") #

Creates a new NoContentGeneratedError.

Parameters:

  • message: Optional custom message (defaults to "No content generated.")

[View source]

Class Method Detail

def self.instance?(error) : Bool #

Checks if the given value is an instance of NoContentGeneratedError.


[View source]