WardrikEvents. Encoder. Value
(wardrik_events v0.1.0-rc.1)
Copy Markdown
Encodes the values inside an event's data as JSON-ready maps with string keys.
Summary
Functions
Puts value under key. If it's longer than 64 KiB, cuts it short and sets "truncated".
Encodes a call's cost as whole micro-dollars. Returns nil if it isn't priced.
Encodes why something failed, as OpenTelemetry's error.type and a message.
Encodes any term as JSON. Maps get string keys, atoms become strings and structs become maps.
Encodes a message. Uses id, or the id in its metadata.
Encodes who did something.
Puts value under key, unless it's nil.
Encodes the tokens a model call read and wrote. Returns nil if there are none.
Functions
Puts value under key. If it's longer than 64 KiB, cuts it short and sets "truncated".
Encodes a call's cost as whole micro-dollars. Returns nil if it isn't priced.
Encodes why something failed, as OpenTelemetry's error.type and a message.
Encodes any term as JSON. Maps get string keys, atoms become strings and structs become maps.
@spec message(ReqLLM.Message.t(), String.t() | nil) :: map()
Encodes a message. Uses id, or the id in its metadata.
@spec principal(WardrikCore.Principal.t() | nil) :: map() | nil
Encodes who did something.
Puts value under key, unless it's nil.
Encodes the tokens a model call read and wrote. Returns nil if there are none.