Package com.sap.ai.sdk.foundationmodels.openai

# Class OpenAiEmbeddingResponse

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.OpenAiEmbeddingResponse

public final class OpenAiEmbeddingResponse extends Object
Represents a response from the OpenAI Embedding API.

A high-level wrapper over the generated model class `EmbeddingsCreate200Response`, improving API usability for common use cases, such as extracting embeddings.

Since:
  1.4.0

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `List<float[]>`
  `getEmbeddingVectors()`
  Read the embeddings from the response as a list of float arrays.
  `EmbeddingsCreate200Response`
  `getOriginalResponse()`
  The original response from the OpenAI Embedding API.
  `int`
  `hashCode()`
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getEmbeddingVectors

    @Nonnull public List<float[]> getEmbeddingVectors()
    Read the embeddings from the response as a list of float arrays.
    Returns:
      a list of float arrays

  - ### getOriginalResponse

    @Nonnull public EmbeddingsCreate200Response getOriginalResponse()
    The original response from the OpenAI Embedding API.

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`