Module: Langfuse::ModelSetters Private

Included in:
Embedding, Generation
Defined in:
lib/langfuse/observations.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Shared setters for observation types that interact with a model (Generation, Embedding).

Instance Method Summary collapse

Instance Method Details

#model=(value) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • value (String)

    Model name (e.g., “gpt-4”, “claude-3-opus”)



319
320
321
# File 'lib/langfuse/observations.rb', line 319

def model=(value)
  update_observation_attributes(model: value)
end

#model_parameters=(value) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • value (Hash)

    Model parameters (temperature, max_tokens, etc.)



325
326
327
# File 'lib/langfuse/observations.rb', line 325

def model_parameters=(value)
  update_observation_attributes(model_parameters: value)
end

#usage=(value) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Deprecated.

Use #usage_details= instead.

This method returns an undefined value.

Parameters:

  • value (Hash)

    Usage hash with token counts



307
308
309
# File 'lib/langfuse/observations.rb', line 307

def usage=(value)
  self.usage_details = value
end

#usage_details=(value) ⇒ void

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

This method returns an undefined value.

Parameters:

  • value (Hash)

    Usage details hash (preserves key shape as provided)



313
314
315
# File 'lib/langfuse/observations.rb', line 313

def usage_details=(value)
  update_observation_attributes(usage_details: value)
end