Package com.sap.ai.sdk.foundationmodels.openai.model

# Class OpenAiChatCompletionOutput

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionOutput
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiChatCompletionOutput

All Implemented Interfaces:
  `DeltaAggregatable<OpenAiChatCompletionDelta>`

@Deprecated public class OpenAiChatCompletionOutput extends OpenAiCompletionOutput implements DeltaAggregatable<OpenAiChatCompletionDelta>
Deprecated.
OpenAI chat completion output.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenAiChatCompletionOutput()`
  Deprecated.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addDelta(OpenAiChatCompletionDelta delta)`
  Deprecated.
  Add a streamed delta to the total output.
  `protected boolean`
  `canEqual(Object other)`
  Deprecated.
  `boolean`
  `equals(Object o)`
  Deprecated.
  `List<OpenAiChatCompletionChoice>`
  `getChoices()`
  Deprecated.
  List of result candidates.
  `String`
  `getContent()`
  Deprecated.
  Get the message content from the output.
  `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.
  `int`
  `hashCode()`
  Deprecated.
  `String`
  `toString()`
  Deprecated.

  ### Methods inherited from class com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionOutput

  `getCreated, getId, getModel, getObject, getPromptFilterResults, getUsage`

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

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

- ## Constructor Details

  - ### OpenAiChatCompletionOutput

    public OpenAiChatCompletionOutput()
    Deprecated.

- ## Method Details

  - ### getContent

    @Nonnull public String getContent() throws OpenAiClientException
    Deprecated.
    Get the message content from the output.

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

    Returns:
      the message content or empty string.
    Throws:
      `OpenAiClientException` - if the content filter filtered the output.

  - ### addDelta

    public void addDelta(@Nonnull OpenAiChatCompletionDelta delta)
    Deprecated.
    Description copied from interface: `DeltaAggregatable`
    Add a streamed delta to the total output.
    Specified by:
      `addDelta` in interface `DeltaAggregatable<OpenAiChatCompletionDelta>`
    Parameters:
      `delta` - the delta to add.

  - ### 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<OpenAiChatCompletionChoice> getChoices()
    Deprecated.
    List of result candidates.

  - ### getSystemFingerprint

    @Nonnull 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.