Class: LiterLlm::AssistantPartOutputAudio

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

Overview

Audio produced by the model (e.g. gpt-4o-audio-preview).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#audioObject (readonly)

rubocop:disable Lint/UselessMethodDefinition



439
440
441
# File 'lib/liter_llm/native.rb', line 439

def audio
  @audio
end

Class Method Details

.from_hash(hash) ⇒ Object



457
458
459
# File 'lib/liter_llm/native.rb', line 457

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

Instance Method Details

#output_audio?Boolean

Returns:

  • (Boolean)


453
454
455
# File 'lib/liter_llm/native.rb', line 453

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

#output_image?Boolean

Returns:

  • (Boolean)


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

def output_image? = false

#refusal?Boolean

Returns:

  • (Boolean)


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

def refusal? = false

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false