pub struct ChatCompletionTokenLogprobTopLogprob {
pub token: String,
pub logprob: f64,
pub bytes: Option<Vec<u64>>,
}
Fields§
§token: String
The token.
logprob: f64
The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0
is used to signify that the token is very unlikely.
bytes: Option<Vec<u64>>
A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null
if there is no bytes representation for the token.
Implementations§
Source§impl ChatCompletionTokenLogprobTopLogprob
impl ChatCompletionTokenLogprobTopLogprob
Sourcepub fn builder() -> ChatCompletionTokenLogprobTopLogprobBuilder<((), (), ())>
pub fn builder() -> ChatCompletionTokenLogprobTopLogprobBuilder<((), (), ())>
Create a builder for building ChatCompletionTokenLogprobTopLogprob
.
On the builder, call .token(...)
, .logprob(...)
, .bytes(...)
(optional) to set the values of the fields.
Finally, call .build()
to create the instance of ChatCompletionTokenLogprobTopLogprob
.
Trait Implementations§
Source§impl Clone for ChatCompletionTokenLogprobTopLogprob
impl Clone for ChatCompletionTokenLogprobTopLogprob
Source§fn clone(&self) -> ChatCompletionTokenLogprobTopLogprob
fn clone(&self) -> ChatCompletionTokenLogprobTopLogprob
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de> Deserialize<'de> for ChatCompletionTokenLogprobTopLogprob
impl<'de> Deserialize<'de> for ChatCompletionTokenLogprobTopLogprob
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 PartialEq for ChatCompletionTokenLogprobTopLogprob
impl PartialEq for ChatCompletionTokenLogprobTopLogprob
Source§fn eq(&self, other: &ChatCompletionTokenLogprobTopLogprob) -> bool
fn eq(&self, other: &ChatCompletionTokenLogprobTopLogprob) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ChatCompletionTokenLogprobTopLogprob
Auto Trait Implementations§
impl Freeze for ChatCompletionTokenLogprobTopLogprob
impl RefUnwindSafe for ChatCompletionTokenLogprobTopLogprob
impl Send for ChatCompletionTokenLogprobTopLogprob
impl Sync for ChatCompletionTokenLogprobTopLogprob
impl Unpin for ChatCompletionTokenLogprobTopLogprob
impl UnwindSafe for ChatCompletionTokenLogprobTopLogprob
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