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.
  • 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.