Exception: Cloudflare::AIError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/cloudflare_workers/ai.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, model: nil, operation: nil) ⇒ AIError

Returns a new instance of AIError.



32
33
34
35
36
# File 'lib/cloudflare_workers/ai.rb', line 32

def initialize(message, model: nil, operation: nil)
  @model = model
  @operation = operation
  super("[Cloudflare::AI] model=#{model || '?'} op=#{operation || 'run'}: #{message}")
end

Instance Attribute Details

#modelObject (readonly)

Returns the value of attribute model.



31
32
33
# File 'lib/cloudflare_workers/ai.rb', line 31

def model
  @model
end

#operationObject (readonly)

Returns the value of attribute operation.



31
32
33
# File 'lib/cloudflare_workers/ai.rb', line 31

def operation
  @operation
end