Package com.sap.ai.sdk.orchestration

# Class OrchestrationEmbeddingRequest

java.lang.Object
com.sap.ai.sdk.orchestration.OrchestrationEmbeddingRequest

public final class OrchestrationEmbeddingRequest extends Object
Represents a request for generating embeddings through the SAP AI Core Orchestration service.

Since:
  1.12.0

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `OrchestrationEmbeddingRequest.InputStep`
  Builder step for specifying text inputs to embed.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `OrchestrationEmbeddingRequest`
  `asDocument()`
  Configures this request to optimize embeddings for document content.
  `OrchestrationEmbeddingRequest`
  `asQuery()`
  Configures this request to optimize embeddings for query content.
  `OrchestrationEmbeddingRequest`
  `asText()`
  Configures this request to optimize embeddings for general text content.
  `boolean`
  `equals(Object o)`
  `static OrchestrationEmbeddingRequest.InputStep`
  `forModel(OrchestrationEmbeddingModel model)`
  Create an embedding request using fluent API starting with model selection.
  `List<String>`
  `getInputs()`
  The list of text inputs to be converted into embeddings.
  `List<MaskingProvider>`
  `getMasking()`
  Optional masking providers for data privacy and security.
  `OrchestrationEmbeddingModel`
  `getModel()`
  The embedding model to use for generating vector representations.
  `int`
  `hashCode()`
  `String`
  `toString()`
  `OrchestrationEmbeddingRequest`
  `withMasking(MaskingProvider maskingProvider, MaskingProvider... maskingProviders)`
  Adds data masking providers to enable detection and masking of sensitive information.

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

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

- ## Method Details

  - ### forModel

    @Nonnull public static OrchestrationEmbeddingRequest.InputStep forModel(@Nonnull OrchestrationEmbeddingModel model)
    Create an embedding request using fluent API starting with model selection.

         OrchestrationEmbeddingRequest.forModel(myModel).forInputs("text to embed");

    Parameters:
      `model` - the embedding model to use
    Returns:
      a step for specifying inputs

  - ### withMasking

    @Nonnull public OrchestrationEmbeddingRequest withMasking(@Nonnull MaskingProvider maskingProvider, @Nonnull MaskingProvider... maskingProviders)
    Adds data masking providers to enable detection and masking of sensitive information.
    Parameters:
      `maskingProvider` - the primary masking provider
      `maskingProviders` - additional masking providers
    Returns:
      a new request instance with the specified masking providers
    See Also:
      - `MaskingProvider`

  - ### asDocument

    @Nonnull public OrchestrationEmbeddingRequest asDocument()
    Configures this request to optimize embeddings for document content.
    Returns:
      a new request instance configured for document embedding

  - ### asText

    @Nonnull public OrchestrationEmbeddingRequest asText()
    Configures this request to optimize embeddings for general text content.
    Returns:
      a new request instance configured for text embedding

  - ### asQuery

    @Nonnull public OrchestrationEmbeddingRequest asQuery()
    Configures this request to optimize embeddings for query content.
    Returns:
      a new request instance configured for query embedding

  - ### getModel

    @Nonnull public OrchestrationEmbeddingModel getModel()
    The embedding model to use for generating vector representations.

  - ### getInputs

    @Nonnull public List<String> getInputs()
    The list of text inputs to be converted into embeddings.

  - ### getMasking

    @Nullable public List<MaskingProvider> getMasking()
    Optional masking providers for data privacy and security.

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