Class: RubynCode::Observability::CostRecord

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

Overview

Immutable record of a single API call’s cost, stored in the database.

Instance Attribute Summary collapse

Instance Attribute Details

#cache_read_tokensObject (readonly)

Returns the value of attribute cache_read_tokens

Returns:

  • (Object)

    the current value of cache_read_tokens



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def cache_read_tokens
  @cache_read_tokens
end

#cache_write_tokensObject (readonly)

Returns the value of attribute cache_write_tokens

Returns:

  • (Object)

    the current value of cache_write_tokens



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def cache_write_tokens
  @cache_write_tokens
end

#cost_usdObject (readonly)

Returns the value of attribute cost_usd

Returns:

  • (Object)

    the current value of cost_usd



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def cost_usd
  @cost_usd
end

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def created_at
  @created_at
end

#idObject (readonly)

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def id
  @id
end

#input_tokensObject (readonly)

Returns the value of attribute input_tokens

Returns:

  • (Object)

    the current value of input_tokens



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def input_tokens
  @input_tokens
end

#modelObject (readonly)

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def model
  @model
end

#output_tokensObject (readonly)

Returns the value of attribute output_tokens

Returns:

  • (Object)

    the current value of output_tokens



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def output_tokens
  @output_tokens
end

#request_typeObject (readonly)

Returns the value of attribute request_type

Returns:

  • (Object)

    the current value of request_type



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def request_type
  @request_type
end

#session_idObject (readonly)

Returns the value of attribute session_id

Returns:

  • (Object)

    the current value of session_id



6
7
8
# File 'lib/rubyn_code/observability/models.rb', line 6

def session_id
  @session_id
end