Class: PromptCanary::Result
- Inherits:
-
Object
- Object
- PromptCanary::Result
- Defined in:
- lib/prompt_canary/result.rb
Instance Attribute Summary collapse
-
#error ⇒ Object
readonly
Returns the value of attribute error.
-
#latency_ms ⇒ Object
readonly
Returns the value of attribute latency_ms.
-
#model ⇒ Object
readonly
Returns the value of attribute model.
-
#recorded_at ⇒ Object
readonly
Returns the value of attribute recorded_at.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#tokens ⇒ Object
readonly
Returns the value of attribute tokens.
-
#version_used ⇒ Object
readonly
Returns the value of attribute version_used.
Instance Method Summary collapse
-
#initialize(text:, version_used:, model:, latency_ms:, tokens:, error:, recorded_at:) ⇒ Result
constructor
A new instance of Result.
Constructor Details
#initialize(text:, version_used:, model:, latency_ms:, tokens:, error:, recorded_at:) ⇒ Result
Returns a new instance of Result.
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/prompt_canary/result.rb', line 7 def initialize(text:, version_used:, model:, latency_ms:, tokens:, error:, recorded_at:) @text = text @version_used = version_used @model = model @latency_ms = latency_ms @tokens = tokens @error = error @recorded_at = recorded_at freeze end |
Instance Attribute Details
#error ⇒ Object (readonly)
Returns the value of attribute error.
5 6 7 |
# File 'lib/prompt_canary/result.rb', line 5 def error @error end |
#latency_ms ⇒ Object (readonly)
Returns the value of attribute latency_ms.
5 6 7 |
# File 'lib/prompt_canary/result.rb', line 5 def latency_ms @latency_ms end |
#model ⇒ Object (readonly)
Returns the value of attribute model.
5 6 7 |
# File 'lib/prompt_canary/result.rb', line 5 def model @model end |
#recorded_at ⇒ Object (readonly)
Returns the value of attribute recorded_at.
5 6 7 |
# File 'lib/prompt_canary/result.rb', line 5 def recorded_at @recorded_at end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
5 6 7 |
# File 'lib/prompt_canary/result.rb', line 5 def text @text end |
#tokens ⇒ Object (readonly)
Returns the value of attribute tokens.
5 6 7 |
# File 'lib/prompt_canary/result.rb', line 5 def tokens @tokens end |
#version_used ⇒ Object (readonly)
Returns the value of attribute version_used.
5 6 7 |
# File 'lib/prompt_canary/result.rb', line 5 def version_used @version_used end |