pub enum Choice {
NonChat(NonChatChoice),
NonStreaming(NonStreamingChoice),
Streaming(StreamingChoice),
}
Variants§
Implementations§
Source§impl Choice
impl Choice
pub fn content(&self) -> Option<&str>
pub fn role(&self) -> Option<&str>
pub fn tool_calls(&self) -> Option<&[ToolCall]>
pub fn finish_reason(&self) -> Option<&FinishReason>
pub fn native_finish_reason(&self) -> Option<&str>
pub fn error(&self) -> Option<&ErrorResponse>
pub fn reasoning(&self) -> Option<&str>
pub fn reasoning_details(&self) -> Option<&[ReasoningDetail]>
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 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