Exception: RubyLLM::UnsupportedAttachmentError

Inherits:
Error
  • Object
show all
Defined in:
lib/ruby_llm/error.rb

Overview

Raised when an attachment cannot be formatted for the selected provider, for example an audio file sent to a model without audio input.

Constant Summary collapse

GUIDANCE =

:nodoc:

'Consider using a model that supports this attachment type.'

Instance Attribute Summary

Attributes inherited from Error

#response

Instance Method Summary collapse

Methods inherited from Error

default_message

Constructor Details

#initialize(type = nil) ⇒ UnsupportedAttachmentError

:nodoc:



96
97
98
99
100
# File 'lib/ruby_llm/error.rb', line 96

def initialize(type = nil) # :nodoc:
  message = 'Unsupported attachment type'
  message = "#{message}: #{type}" if type
  super("#{message}. #{GUIDANCE}")
end