pub struct ChatCompletionResponseChoice { /* private fields */ }
Expand description
A response choice from a chat completion request.
Implementations§
Source§impl ChatCompletionResponseChoice
impl ChatCompletionResponseChoice
Sourcepub fn message(self) -> OpenAIResult<String>
pub fn message(self) -> OpenAIResult<String>
Takes the message and returns a result that may contain a refusal.
pub fn finish_reason(&self) -> FinishReason
pub fn index(&self) -> i32
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ChatCompletionResponseChoice
impl<'de> Deserialize<'de> for ChatCompletionResponseChoice
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 ChatCompletionResponseChoice
impl RefUnwindSafe for ChatCompletionResponseChoice
impl Send for ChatCompletionResponseChoice
impl Sync for ChatCompletionResponseChoice
impl Unpin for ChatCompletionResponseChoice
impl UnwindSafe for ChatCompletionResponseChoice
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