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



133
134
135
# File 'lib/liter_llm/native.rb', line 133

def audio
  @audio
end

Class Method Details

.from_hash(hash) ⇒ Object



151
152
153
# File 'lib/liter_llm/native.rb', line 151

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

Instance Method Details

#output_audio?Boolean

Returns:

  • (Boolean)


147
148
149
# File 'lib/liter_llm/native.rb', line 147

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

#output_image?Boolean

Returns:

  • (Boolean)


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

def output_image? = false

#refusal?Boolean

Returns:

  • (Boolean)


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

def refusal? = false

#text?Boolean

Returns:

  • (Boolean)


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

def text? = false