Package com.sap.ai.sdk.orchestration

# Class OrchestrationPrompt

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

public final class OrchestrationPrompt extends Object
Represents a request that can be sent to the orchestration service, containing messages and configuration for the orchestration modules. Prompts may be reused across multiple requests.

See Also:
  - `OrchestrationClient`
  - `OrchestrationConfig`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OrchestrationPrompt(Message message, Message... messages)`
  Initialize a prompt from the given messages.
  `OrchestrationPrompt(String message)`
  Initialize a prompt with the given user message.
  `OrchestrationPrompt(Map<String,String> inputParams, Message... messages)`
  Initialize a prompt based on template variables.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `OrchestrationPrompt`
  `messageHistory(List<Message> messagesHistory)`
  Set the chat history of this prompt.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### OrchestrationPrompt

    public OrchestrationPrompt(@Nonnull String message)
    Initialize a prompt with the given user message.
    Parameters:
      `message` - A user message.

  - ### OrchestrationPrompt

    public OrchestrationPrompt(@Nonnull Message message, @Nonnull Message... messages)
    Initialize a prompt from the given messages.
    Parameters:
      `message` - The first message.
      `messages` - Optionally, more messages.

  - ### OrchestrationPrompt

    public OrchestrationPrompt(@Nonnull Map<String,String> inputParams, @Nonnull Message... messages)
    Initialize a prompt based on template variables.
    Parameters:
      `inputParams` - The input parameters as entries of template variables and their contents.
      `messages` - The messages to be sent to the orchestration service.

- ## Method Details

  - ### messageHistory

    @Nonnull public OrchestrationPrompt messageHistory(@Nonnull List<Message> messagesHistory)
    Set the chat history of this prompt.
    Parameters:
      `messagesHistory` - The chat history to add.
    Returns:
      The current instance of `OrchestrationPrompt` with the changed chat history.

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