Usage

sealed interface Usage : GenAIAttribute(source)

gen_ai.usage attribute namespace.

Inheritors

Types

Link copied to clipboard
data class InputTokens(val tokens: Int) : GenAIAttributes.Usage

gen_ai.usage.input_tokens attribute.

Link copied to clipboard
data class OutputTokens(val tokens: Int) : GenAIAttributes.Usage

gen_ai.usage.output_tokens attribute.

Link copied to clipboard
data class TotalTokens(val tokens: Int) : GenAIAttributes.Usage

gen_ai.usage.total_tokens attribute.

Properties

Link copied to clipboard
open override val key: String

Attribute key

Link copied to clipboard
abstract val value: Any

Attribute value.

Functions

Link copied to clipboard
open fun String.concatKey(other: String): String

Joins two attribute-key segments with a . separator.