Deserialised response from OpenAI's Embeddings endpoint (POST /v1/embeddings), returned by OpenAiClient.createEmbeddings. Wraps the generated embedding vectors and the token usage for the request, and is used by OpenAiEmbeddingsProvider when it turns text into vectors for the platform's vector search.


Properties

PropertyReturnsDescription
dataList<Embedding>Generated embeddings, one per input text, in the same order the inputs were submitted.
modelStringName of the OpenAI embedding model that produced the vectors, for example text-embedding-3-small.
objectStringObject type string OpenAI returns for this response, typically "list".
usageEmbeddingUsageToken usage recorded by OpenAI for this embeddings request.

Methods

getObject()

Returns: String

Object type string OpenAI returns for this response, typically "list".

getModel()

Returns: String

Name of the OpenAI embedding model that produced the vectors, for example text-embedding-3-small.

getData()

Returns: List<Embedding>

Generated embeddings, one per input text, in the same order the inputs were submitted.

getUsage()

Returns: EmbeddingUsage

Token usage recorded by OpenAI for this embeddings request.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.