Class: Cohere::Transcribe::ProgressEvent

Inherits:
Data
  • Object
show all
Defined in:
lib/cohere/transcribe/types.rb,
sig/cohere/transcribe.rbs

Overview

A serialized message or bounded progress update from a run.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stage:, message: nil, current: nil, total: nil) ⇒ ProgressEvent

Returns a new instance of ProgressEvent.



435
436
437
438
439
440
441
442
# File 'lib/cohere/transcribe/types.rb', line 435

def initialize(stage:, message: nil, current: nil, total: nil)
  super(
    stage: TypesSupport.immutable(stage),
    message: TypesSupport.immutable(message),
    current: current,
    total: total
  )
end

Instance Attribute Details

#currentObject (readonly)

Returns the value of attribute current

Returns:

  • (Object)

    the current value of current



434
435
436
# File 'lib/cohere/transcribe/types.rb', line 434

def current
  @current
end

#messageObject (readonly)

Returns the value of attribute message

Returns:

  • (Object)

    the current value of message



434
435
436
# File 'lib/cohere/transcribe/types.rb', line 434

def message
  @message
end

#stageObject (readonly)

Returns the value of attribute stage

Returns:

  • (Object)

    the current value of stage



434
435
436
# File 'lib/cohere/transcribe/types.rb', line 434

def stage
  @stage
end

#totalObject (readonly)

Returns the value of attribute total

Returns:

  • (Object)

    the current value of total



434
435
436
# File 'lib/cohere/transcribe/types.rb', line 434

def total
  @total
end

Class Method Details

.newProgressEvent

Parameters:

  • stage: (String)
  • message: (String, nil)
  • current: (Integer, nil)
  • total: (Integer, nil)

Returns:



187
# File 'sig/cohere/transcribe.rbs', line 187

def self.new: (stage: String, ?message: String?, ?current: Integer?, ?total: Integer?) -> ProgressEvent