openai_struct/models/
create_completion_response_choices.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 CreateCompletionResponseChoices {
16    /// The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request was reached, or `content_filter` if content was omitted due to a flag from our content filters.
17    #[serde(rename = "finish_reason")]
18    pub finish_reason: String,
19    #[serde(rename = "index")]
20    pub index: i32,
21    #[serde(rename = "logprobs")]
22    pub logprobs: crate::models::CreateCompletionResponseLogprobs,
23    #[serde(rename = "text")]
24    pub text: String,
25}