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

# Class OpenAiCompletionParameters.OpenAiStreamOptions

java.lang.Object
com.sap.ai.sdk.foundationmodels.openai.model.OpenAiCompletionParameters.OpenAiStreamOptions

Enclosing class:
  `OpenAiCompletionParameters`

public static class OpenAiCompletionParameters.OpenAiStreamOptions extends Object
"stream_options": { "include_usage": "true" }

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OpenAiStreamOptions()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected boolean`
  `canEqual(Object other)`
  `boolean`
  `equals(Object o)`
  `int`
  `hashCode()`
  `OpenAiCompletionParameters.OpenAiStreamOptions`
  `setInclude_usage(Boolean include_usage)`
  If set, an additional chunk will be streamed before the `data: [DONE]` message.
  `String`
  `toString()`

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

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

- ## Constructor Details

  - ### OpenAiStreamOptions

    public OpenAiStreamOptions()

- ## Method Details

  - ### setInclude_usage

    public OpenAiCompletionParameters.OpenAiStreamOptions setInclude_usage(Boolean include_usage)
    If set, an additional chunk will be streamed before the `data: [DONE]` message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
    Returns:
      `this`.

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### canEqual

    protected boolean canEqual(Object other)

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`