pub struct Choice {
pub text: String,
pub index: u64,
pub logprobs: Option<LogProbs>,
pub finish_reason: String,
}
Expand description
A single completion result
Fields§
§text: String
The text of the completion. Will contain the prompt if echo is True.
index: u64
Offset in the result where the completion began. Useful if using echo.
logprobs: Option<LogProbs>
If requested, the log probabilities of the completion tokens
finish_reason: String
Why the completion ended when it did
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