EmbeddingInvocation

data class EmbeddingInvocation(val embeddingMetadata: <Error class: unknown class>, val usage: Usage, val agentName: String? = null, val timestamp: Instant, val runningTime: Duration)

Invocation we made to an EmbeddingServiceMetadata. Mirror of LlmInvocation for embedding services.

Embeddings have no completion tokens, only prompt tokens.

Parameters

agentName

name of the agent, if known

Constructors

Link copied to clipboard
constructor(embeddingMetadata: <Error class: unknown class>, usage: Usage, agentName: String? = null, timestamp: Instant, runningTime: Duration)

Properties

Link copied to clipboard
val agentName: String? = null
Link copied to clipboard
val embeddingMetadata: <Error class: unknown class>
Link copied to clipboard
Link copied to clipboard
open val timestamp: Instant
Link copied to clipboard

Functions

Link copied to clipboard
fun cost(): Double

Dollar cost of this embedding call. Computed from prompt tokens only (embeddings have no completion tokens).