Module: Braintrust::Internal::Origin
- Defined in:
- lib/braintrust/internal/origin.rb
Overview
Origin builds source object pointers, which link spans back to the record they came from (e.g., a dataset row). Pointers stay Hashes internally and are serialized once at the boundary that needs them, so that inbound pointers from the wire and ones we build here have the same shape.
Class Method Summary collapse
-
.build(object_type:, object_id:, id:, xact_id:, created:) ⇒ Hash
Build an origin pointer.
Class Method Details
.build(object_type:, object_id:, id:, xact_id:, created:) ⇒ Hash
Build an origin pointer
17 18 19 20 21 22 23 24 25 |
# File 'lib/braintrust/internal/origin.rb', line 17 def self.build(object_type:, object_id:, id:, xact_id:, created:) { "object_type" => object_type, "object_id" => object_id, "id" => id, "_xact_id" => xact_id, "created" => created } end |