pub struct ResponseLogProb {
pub logprob: f64,
pub token: String,
pub top_logprobs: Vec<ResponseLogProbTopLogprobsItem>,
}Expand description
A logprob is the logarithmic probability that the model assigns to producing a particular token at a given position in the sequence. Less-negative (higher) logprob values indicate greater model confidence in that token choice.
JSON schema
{
"description": "A logprob is the logarithmic probability that the model assigns to producing \na particular token at a given position in the sequence. Less-negative (higher) \nlogprob values indicate greater model confidence in that token choice.\n",
"type": "object",
"required": [
"logprob",
"token"
],
"properties": {
"logprob": {
"description": "The log probability of this token.\n",
"type": "number"
},
"token": {
"description": "A possible text token.",
"type": "string"
},
"top_logprobs": {
"description": "The log probabilities of up to 20 of the most likely tokens.\n",
"type": "array",
"items": {
"type": "object",
"properties": {
"logprob": {
"description": "The log probability of this token.",
"type": "number"
},
"token": {
"description": "A possible text token.",
"type": "string"
}
}
}
}
}
}Fields§
§logprob: f64The log probability of this token.
token: StringA possible text token.
top_logprobs: Vec<ResponseLogProbTopLogprobsItem>The log probabilities of up to 20 of the most likely tokens.
Trait Implementations§
Source§impl Clone for ResponseLogProb
impl Clone for ResponseLogProb
Source§fn clone(&self) -> ResponseLogProb
fn clone(&self) -> ResponseLogProb
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ResponseLogProb
impl Debug for ResponseLogProb
Source§impl<'de> Deserialize<'de> for ResponseLogProb
impl<'de> Deserialize<'de> for ResponseLogProb
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 ResponseLogProb
impl RefUnwindSafe for ResponseLogProb
impl Send for ResponseLogProb
impl Sync for ResponseLogProb
impl Unpin for ResponseLogProb
impl UnsafeUnpin for ResponseLogProb
impl UnwindSafe for ResponseLogProb
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