pub struct LogprobToken {
pub token: String,
pub logprob: f64,
pub top_logprobs: Vec<Alternative>,
}Expand description
One generated token with its log probability and the alternatives returned with it.
Fields§
§token: StringToken text, including any leading space.
logprob: f64Natural-log probability of this token.
top_logprobs: Vec<Alternative>Top alternatives at this position, most likely first.
Implementations§
Trait Implementations§
Source§impl Clone for LogprobToken
impl Clone for LogprobToken
Source§impl Debug for LogprobToken
impl Debug for LogprobToken
Source§impl<'de> Deserialize<'de> for LogprobToken
impl<'de> Deserialize<'de> for LogprobToken
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
Source§impl From<&ChatCompletionTokenLogprob> for LogprobToken
Available on crate feature async-openai only.
impl From<&ChatCompletionTokenLogprob> for LogprobToken
Available on crate feature
async-openai only.Source§fn from(t: &ChatCompletionTokenLogprob) -> Self
fn from(t: &ChatCompletionTokenLogprob) -> Self
Converts to this type from the input type.
Source§impl PartialEq for LogprobToken
impl PartialEq for LogprobToken
Source§impl Serialize for LogprobToken
impl Serialize for LogprobToken
impl StructuralPartialEq for LogprobToken
Auto Trait Implementations§
impl Freeze for LogprobToken
impl RefUnwindSafe for LogprobToken
impl Send for LogprobToken
impl Sync for LogprobToken
impl Unpin for LogprobToken
impl UnsafeUnpin for LogprobToken
impl UnwindSafe for LogprobToken
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