Class ResponseCreateParams.StreamOptions
-
- All Implemented Interfaces:
public final class ResponseCreateParams.StreamOptionsOptions for streaming responses. Only set this when you set
stream: true.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classResponseCreateParams.StreamOptions.BuilderA builder for StreamOptions.
-
Method Summary
Modifier and Type Method Description final Optional<Boolean>includeObfuscation()When true, stream obfuscation will be enabled. final JsonField<Boolean>_includeObfuscation()Returns the raw JSON value of includeObfuscation. final Map<String, JsonValue>_additionalProperties()final ResponseCreateParams.StreamOptions.BuildertoBuilder()final ResponseCreateParams.StreamOptionsvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseCreateParams.StreamOptions.Builderbuilder()Returns a mutable builder for constructing an instance of StreamOptions. -
-
Method Detail
-
includeObfuscation
final Optional<Boolean> includeObfuscation()
When true, stream obfuscation will be enabled. Stream obfuscation adds random characters to an
obfuscationfield on streaming delta events to normalize payload sizes as a mitigation to certain side-channel attacks. These obfuscation fields are included by default, but add a small amount of overhead to the data stream. You can setinclude_obfuscationto false to optimize for bandwidth if you trust the network links between your application and the OpenAI API.
-
_includeObfuscation
final JsonField<Boolean> _includeObfuscation()
Returns the raw JSON value of includeObfuscation.
Unlike includeObfuscation, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ResponseCreateParams.StreamOptions.Builder toBuilder()
-
validate
final ResponseCreateParams.StreamOptions validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static ResponseCreateParams.StreamOptions.Builder builder()
Returns a mutable builder for constructing an instance of StreamOptions.
-
-
-
-