Struct async_openai::types::ChatCompletionTokenLogprob
source · pub struct ChatCompletionTokenLogprob {
pub token: String,
pub logprob: f32,
pub bytes: Option<Vec<u8>>,
pub top_logprobs: Vec<TopLogprobs>,
}
Fields§
§token: String
The token.
logprob: f32
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<u8>>
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.
top_logprobs: Vec<TopLogprobs>
List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs
returned.
Trait Implementations§
source§impl Clone for ChatCompletionTokenLogprob
impl Clone for ChatCompletionTokenLogprob
source§fn clone(&self) -> ChatCompletionTokenLogprob
fn clone(&self) -> ChatCompletionTokenLogprob
Returns a copy 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 Debug for ChatCompletionTokenLogprob
impl Debug for ChatCompletionTokenLogprob
source§impl<'de> Deserialize<'de> for ChatCompletionTokenLogprob
impl<'de> Deserialize<'de> for ChatCompletionTokenLogprob
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 ChatCompletionTokenLogprob
impl PartialEq for ChatCompletionTokenLogprob
source§fn eq(&self, other: &ChatCompletionTokenLogprob) -> bool
fn eq(&self, other: &ChatCompletionTokenLogprob) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ChatCompletionTokenLogprob
Auto Trait Implementations§
impl Freeze for ChatCompletionTokenLogprob
impl RefUnwindSafe for ChatCompletionTokenLogprob
impl Send for ChatCompletionTokenLogprob
impl Sync for ChatCompletionTokenLogprob
impl Unpin for ChatCompletionTokenLogprob
impl UnwindSafe for ChatCompletionTokenLogprob
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)