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

# Class OpenAiEmbeddingRequest

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

public final class OpenAiEmbeddingRequest extends Object
Represents a request to create embeddings using OpenAI's API.

A high-level wrapper over the generated model class `EmbeddingsCreateRequest`, * improving API usability for common use cases such as creation from a list of tokens.

Since:
  1.4.0

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenAiEmbeddingRequest(List<String> tokens)`
  Constructs an OpenAiEmbeddingRequest from a list of strings.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `List<String>`
  `getTokens()`
  List of tokens to be embedded.
  `int`
  `hashCode()`
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### OpenAiEmbeddingRequest

    public OpenAiEmbeddingRequest(@Nonnull List<String> tokens)
    Constructs an OpenAiEmbeddingRequest from a list of strings.
    Parameters:
      `tokens` - a list of tokens to be embedded

- ## Method Details

  - ### getTokens

    @Nonnull public List<String> getTokens()
    List of tokens to be embedded.

  - ### 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`