Class: Whitebox::Run

Inherits:
Data
  • Object
show all
Defined in:
lib/whitebox/models.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#answerObject (readonly)

Returns the value of attribute answer

Returns:

  • (Object)

    the current value of answer



2
3
4
# File 'lib/whitebox/models.rb', line 2

def answer
  @answer
end

#latency_msObject (readonly)

Returns the value of attribute latency_ms

Returns:

  • (Object)

    the current value of latency_ms



2
3
4
# File 'lib/whitebox/models.rb', line 2

def latency_ms
  @latency_ms
end

#logprobObject (readonly)

Returns the value of attribute logprob

Returns:

  • (Object)

    the current value of logprob



2
3
4
# File 'lib/whitebox/models.rb', line 2

def logprob
  @logprob
end

#modelObject (readonly)

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



2
3
4
# File 'lib/whitebox/models.rb', line 2

def model
  @model
end

Class Method Details

.from_hash(h) ⇒ Object



3
4
5
6
7
8
9
10
# File 'lib/whitebox/models.rb', line 3

def self.from_hash(h)
  new(
    model: h["model"],
    answer: h["answer"],
    logprob: h["logprob"],
    latency_ms: h["latency_ms"]
  )
end