openai_struct/models/chat_completion_token_logprob.rs
1/*
2 * OpenAI API
3 *
4 * The OpenAI REST API. Please see pub https://platform.openai.com/docs/api-reference for more details.
5 *
6 * OpenAPI spec pub version: 2.3.0
7 *
8 * Generated pub by: https://github.com/swagger-api/swagger-codegen.git
9 */
10
11#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct ChatCompletionTokenLogprob {
16 /// 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.
17 #[serde(rename = "bytes")]
18 pub bytes: Vec<i32>,
19 /// 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.
20 #[serde(rename = "logprob")]
21 pub logprob: f32,
22 /// The token.
23 #[serde(rename = "token")]
24 pub token: String,
25 /// 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.
26 #[serde(rename = "top_logprobs")]
27 pub top_logprobs: Vec<crate::models::ChatCompletionTokenLogprobTopLogprobs>,
28}