Class: Langfuse::Models::Score
- Inherits:
-
Object
- Object
- Langfuse::Models::Score
- Defined in:
- lib/langfuse/models/score.rb
Instance Attribute Summary collapse
-
#comment ⇒ Object
Returns the value of attribute comment.
-
#config_id ⇒ Object
Returns the value of attribute config_id.
-
#data_type ⇒ Object
Returns the value of attribute data_type.
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#observation_id ⇒ Object
Returns the value of attribute observation_id.
-
#trace_id ⇒ Object
Returns the value of attribute trace_id.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Score
constructor
A new instance of Score.
- #to_h ⇒ Object
Constructor Details
#initialize(attributes = {}) ⇒ Score
Returns a new instance of Score.
9 10 11 12 13 14 |
# File 'lib/langfuse/models/score.rb', line 9 def initialize(attributes = {}) attributes.each do |key, value| send("#{key}=", value) if respond_to?("#{key}=") end @id ||= SecureRandom.uuid end |
Instance Attribute Details
#comment ⇒ Object
Returns the value of attribute comment.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def comment @comment end |
#config_id ⇒ Object
Returns the value of attribute config_id.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def config_id @config_id end |
#data_type ⇒ Object
Returns the value of attribute data_type.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def data_type @data_type end |
#environment ⇒ Object
Returns the value of attribute environment.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def environment @environment end |
#id ⇒ Object
Returns the value of attribute id.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def name @name end |
#observation_id ⇒ Object
Returns the value of attribute observation_id.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def observation_id @observation_id end |
#trace_id ⇒ Object
Returns the value of attribute trace_id.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def trace_id @trace_id end |
#value ⇒ Object
Returns the value of attribute value.
6 7 8 |
# File 'lib/langfuse/models/score.rb', line 6 def value @value end |
Instance Method Details
#to_h ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/langfuse/models/score.rb', line 16 def to_h { id: @id, traceId: @trace_id, name: @name, value: @value, observationId: @observation_id, comment: @comment, dataType: @data_type, configId: @config_id, environment: @environment }.compact end |