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



393
394
395
# File 'lib/liter_llm/native.rb', line 393

def refusal
  @refusal
end

Class Method Details

.from_hash(hash) ⇒ Object



411
412
413
# File 'lib/liter_llm/native.rb', line 411

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

Instance Method Details

#output_audio?Boolean

Returns:

  • (Boolean)


407
408
409
# File 'lib/liter_llm/native.rb', line 407

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

#output_image?Boolean

Returns:

  • (Boolean)


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

def output_image? = false

#refusal?Boolean

Returns:

  • (Boolean)


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

def refusal? = true

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false