pub struct StreamOptions {
pub include_usage: bool,
}
Fields§
§include_usage: bool
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.
NOTE: If the stream is interrupted, you may not receive the final usage
chunk which contains the total token usage for the request.
Trait Implementations§
Source§impl Debug for StreamOptions
impl Debug for StreamOptions
Auto Trait Implementations§
impl Freeze for StreamOptions
impl RefUnwindSafe for StreamOptions
impl Send for StreamOptions
impl Sync for StreamOptions
impl Unpin for StreamOptions
impl UnwindSafe for StreamOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more