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
Source
Completion.scala
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

Source
Completion.scala
def withTotalTokens(totalTokens: Int): EmbeddingUsage

Sets the total tokens used.

Sets the total tokens used.

Attributes

Source
Completion.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product