Class OpenAiChatCompletionDelta
java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.OpenAiChatCompletionDelta
- All Implemented Interfaces:
StreamedDelta
Represents an OpenAI chat completion output delta for streaming.
- Since:
- 1.4.0
-
Method Details
-
getDeltaContent
Description copied from interface:StreamedDeltaGet 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:
getDeltaContentin interfaceStreamedDelta- Returns:
- the message content or empty string.
-
getFinishReason
Description copied from interface:StreamedDeltaReason 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 parameterlength: Incomplete model output due to max_tokens parameter or token limitfunction_call: The model decided to call a functioncontent_filter: Omitted content due to a flag from our content filtersnull: API response still in progress or incomplete- Specified by:
getFinishReasonin interfaceStreamedDelta- Returns:
- the finish reason or null.
-
getCompletionUsage
Retrieves the completion usage from the response, or null if it is not available.- Returns:
- The completion usage or null.
-
getOriginalResponse
The original response from the chat completion stream. -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-