Class OpenAiChatCompletionDelta

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionOutput
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiChatCompletionDelta
All Implemented Interfaces:
StreamedDelta

@Deprecated public class OpenAiChatCompletionDelta extends OpenAiCompletionOutput implements StreamedDelta
Deprecated.
OpenAI chat completion output delta for streaming.
  • Constructor Details

    • OpenAiChatCompletionDelta

      public OpenAiChatCompletionDelta()
      Deprecated.
  • Method Details

    • getDeltaContent

      @Nonnull public String getDeltaContent()
      Deprecated.
      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()
      Deprecated.
      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.
    • equals

      public boolean equals(Object o)
      Deprecated.
      Overrides:
      equals in class OpenAiCompletionOutput
    • canEqual

      protected boolean canEqual(Object other)
      Deprecated.
      Overrides:
      canEqual in class OpenAiCompletionOutput
    • hashCode

      public int hashCode()
      Deprecated.
      Overrides:
      hashCode in class OpenAiCompletionOutput
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class OpenAiCompletionOutput
    • getChoices

      @Nonnull public List<OpenAiDeltaChatCompletionChoice> getChoices()
      Deprecated.
      List of result candidates.
    • getSystemFingerprint

      @Nullable public String getSystemFingerprint()
      Deprecated.
      Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.