pub struct ChatCompletionChoice {
pub index: u32,
pub message: ChatMessage,
pub finish_reason: Option<String>,
}
Expand description
A single chat completion choice within a CreateChatCompletionResponse
.
Fields§
§index: u32
The index of this choice (useful if n
> 1).
message: ChatMessage
The chat message object containing the role and content.
finish_reason: Option<String>
Why the chat completion ended (e.g., “stop”, “length”).
Trait Implementations§
Source§impl Debug for ChatCompletionChoice
impl Debug for ChatCompletionChoice
Source§impl<'de> Deserialize<'de> for ChatCompletionChoice
impl<'de> Deserialize<'de> for ChatCompletionChoice
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 ChatCompletionChoice
impl RefUnwindSafe for ChatCompletionChoice
impl Send for ChatCompletionChoice
impl Sync for ChatCompletionChoice
impl Unpin for ChatCompletionChoice
impl UnwindSafe for ChatCompletionChoice
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