public final class EmbeddingResponse

  1. Object
  2. EmbeddingResponse
Immutable provider response containing embeddings, token accounting, and the model name reported by the service.

Constructors

public EmbeddingResponse(List<Embedding> data, Usage usage, String modelUsed)Creates a normalized embedding response.

Methods

public List<Embedding> getData()
public Usage getUsage()
public String getModelUsed()

Inherited methods

Constructor details

EmbeddingResponse

public EmbeddingResponse(List<Embedding> data, Usage usage, String modelUsed)
Creates a normalized embedding response.

Parameters

data List<Embedding>
embedding items in provider response order; null becomes empty
usage Usage
provider token accounting, or null when omitted
modelUsed String
model identifier returned by the provider

Method details

getData

public List<Embedding> getData()

Returns

immutable embedding items in request order

getUsage

public Usage getUsage()

Returns

provider token accounting, or null when unavailable

getModelUsed

public String getModelUsed()

Returns

provider-reported model identifier, or null when omitted