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")



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

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.)



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

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



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

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)



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

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