pub struct ChatCompletionChunkChoice {
pub index: u32,
pub delta: ChatCompletionChunkDelta,
pub finish_reason: Option<String>,
}Expand description
Represents a single choice in a streaming chat completion response.
Fields§
§index: u32The index of the choice in the list of choices.
delta: ChatCompletionChunkDeltaA delta payload with the content that has changed since the last chunk.
finish_reason: Option<String>The reason the model stopped generating tokens.
Trait Implementations§
Source§impl Clone for ChatCompletionChunkChoice
impl Clone for ChatCompletionChunkChoice
Source§fn clone(&self) -> ChatCompletionChunkChoice
fn clone(&self) -> ChatCompletionChunkChoice
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChatCompletionChunkChoice
impl Debug for ChatCompletionChunkChoice
Source§impl<'de> Deserialize<'de> for ChatCompletionChunkChoice
impl<'de> Deserialize<'de> for ChatCompletionChunkChoice
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ChatCompletionChunkChoice
impl RefUnwindSafe for ChatCompletionChunkChoice
impl Send for ChatCompletionChunkChoice
impl Sync for ChatCompletionChunkChoice
impl Unpin for ChatCompletionChunkChoice
impl UnsafeUnpin for ChatCompletionChunkChoice
impl UnwindSafe for ChatCompletionChunkChoice
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