EmbeddingUsage

org.llm4s.llmconnect.model.EmbeddingUsage
See theEmbeddingUsage companion object
@Stable
final case class EmbeddingUsage

Token usage statistics for an embedding request.

Value parameters

promptTokens

Number of tokens in the input text(s).

totalTokens

Total tokens used (same as promptTokens for embeddings). Build one with EmbeddingUsage.apply and change it with the with* setters; the constructor and copy are private, so a new field never breaks callers.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def withPromptTokens(promptTokens: Int): EmbeddingUsage

Sets the number of input tokens.

Sets the number of input tokens.

Attributes

def withTotalTokens(totalTokens: Int): EmbeddingUsage

Sets the total tokens used.

Sets the total tokens used.

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product