Package com.sap.ai.sdk.orchestration

# Class OrchestrationChatCompletionDelta

java.lang.Object
com.sap.ai.sdk.orchestration.model.CompletionPostResponseStreaming
com.sap.ai.sdk.orchestration.OrchestrationChatCompletionDelta

All Implemented Interfaces:
  `StreamedDelta`

public class OrchestrationChatCompletionDelta extends CompletionPostResponseStreaming implements StreamedDelta
Orchestration chat completion output delta for streaming.

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class com.sap.ai.sdk.orchestration.model.CompletionPostResponseStreaming

  `CompletionPostResponseStreaming.Builder`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OrchestrationChatCompletionDelta()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDeltaContent()`
  Get the message content from the delta.
  `String`
  `getFinishReason()`
  Reason for finish.

  ### Methods inherited from class com.sap.ai.sdk.orchestration.model.CompletionPostResponseStreaming

  `addIntermediateFailuresItem, create, equals, finalResult, getCustomField, getCustomFieldNames, getFinalResult, getIntermediateFailures, getIntermediateResults, getRequestId, hashCode, intermediateFailures, intermediateResults, requestId, setCustomField, setFinalResult, setIntermediateFailures, setIntermediateResults, setRequestId, toMap, toString`

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

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

- ## Constructor Details

  - ### OrchestrationChatCompletionDelta

    public OrchestrationChatCompletionDelta()

- ## Method Details

  - ### getDeltaContent

    @Nonnull public String getDeltaContent()
    Description copied from interface: `StreamedDelta`
    Get the message content from the delta.

    Note: If there are multiple choices only the first one is returned

    Note: Some deltas do not contain any content

    Specified by:
      `getDeltaContent` in interface `StreamedDelta`
    Returns:
      the message content or empty string.

  - ### getFinishReason

    @Nullable public String getFinishReason()
    Description copied from interface: `StreamedDelta`
    Reason for finish. The possible values are:

    `stop`: API returned complete message, or a message terminated by one of the stop sequences provided via the stop parameter

    `length`: Incomplete model output due to max_tokens parameter or token limit

    `function_call`: The model decided to call a function

    `content_filter`: Omitted content due to a flag from our content filters

    `null`: API response still in progress or incomplete

    Specified by:
      `getFinishReason` in interface `StreamedDelta`
    Returns:
      the finish reason or null.