Class: LiterLlm::AssistantPartRefusal

Inherits:
Data
  • Object
show all
Extended by:
T::Sig
Includes:
AssistantPart
Defined in:
lib/liter_llm/native.rb

Overview

A refusal — the model declined to respond.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#refusalObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



366
367
368
# File 'lib/liter_llm/native.rb', line 366

def refusal
  @refusal
end

Class Method Details

.from_hash(hash) ⇒ Object



384
385
386
# File 'lib/liter_llm/native.rb', line 384

def self.from_hash(hash)
  new(refusal: hash[:refusal] || hash["refusal"])
end

Instance Method Details

#output_audio?Boolean

Returns:

  • (Boolean)


380
381
382
# File 'lib/liter_llm/native.rb', line 380

def output_audio? = false
# @param hash [Hash] deserialized from the native extension
# @return [self]

#output_image?Boolean

Returns:

  • (Boolean)


378
# File 'lib/liter_llm/native.rb', line 378

def output_image? = false

#refusal?Boolean

Returns:

  • (Boolean)


376
# File 'lib/liter_llm/native.rb', line 376

def refusal? = true

#text?Boolean

Returns:

  • (Boolean)


374
# File 'lib/liter_llm/native.rb', line 374

def text? = false