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



87
88
89
# File 'lib/liter_llm/native.rb', line 87

def refusal
  @refusal
end

Class Method Details

.from_hash(hash) ⇒ Object



105
106
107
# File 'lib/liter_llm/native.rb', line 105

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

Instance Method Details

#output_audio?Boolean

Returns:

  • (Boolean)


101
102
103
# File 'lib/liter_llm/native.rb', line 101

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

#output_image?Boolean

Returns:

  • (Boolean)


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

def output_image? = false

#refusal?Boolean

Returns:

  • (Boolean)


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

def refusal? = true

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false