pub struct Params {
pub response_id: String,
pub include: Option<Vec<Includable>>,
pub stream: Option<bool>,
pub starting_after: Option<i64>,
pub include_obfuscation: Option<bool>,
}Fields§
§response_id: StringThe ID of the response to retrieve.
include: Option<Vec<Includable>>Additional fields to include in the response. See the include
parameter for Response creation above for more information.
stream: Option<bool>If set to true, the model response data will be streamed to the client as it is generated using server-sent events. See the Streaming section below for more information.
starting_after: Option<i64>The sequence number of the event after which to start streaming.
include_obfuscation: Option<bool>When true, stream obfuscation will be enabled. Stream obfuscation adds
random characters to an obfuscation field 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 set
include_obfuscation to false to optimize for bandwidth if you trust
the network links between your application and the OpenAI API.
Implementations§
Source§impl Params
impl Params
Sourcepub fn builder() -> ParamsBuilder<((), (), (), (), ())>
pub fn builder() -> ParamsBuilder<((), (), (), (), ())>
Create a builder for building Params.
On the builder, call .response_id(...), .include(...)(optional), .stream(...)(optional), .starting_after(...)(optional), .include_obfuscation(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of Params.