pub struct Choice {
pub index: u32,
pub delta: Delta,
pub finish_reason: Option<FinishReason>,
pub logprobs: Option<LogProbs>,
}Expand description
A completion choice (used for both streaming and non-streaming responses).
Fields§
§index: u32The index of this choice in the list
delta: DeltaThe message content (streaming: delta, non-streaming: message)
finish_reason: Option<FinishReason>The reason the model stopped generating
logprobs: Option<LogProbs>Log probability information
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Choice
impl<'de> Deserialize<'de> for Choice
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 Choice
impl RefUnwindSafe for Choice
impl Send for Choice
impl Sync for Choice
impl Unpin for Choice
impl UnsafeUnpin for Choice
impl UnwindSafe for Choice
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