openai_struct/models/create_chat_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
11use crate::FinishReason;
12#[allow(unused_imports)]
13use serde_json::Value;
14
15#[derive(Debug, Serialize, Deserialize)]
16pub struct CreateChatCompletionResponseChoices {
17 /// 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, `content_filter` if content was omitted due to a flag from our content filters, `tool_calls` if the model called a tool, or `function_call` (deprecated) if the model called a function.
18 #[serde(rename = "finish_reason")]
19 pub finish_reason: Option<FinishReason>,
20 /// The index of the choice in the list of choices.
21 #[serde(rename = "index")]
22 pub index: i32,
23 #[serde(rename = "logprobs")]
24 pub logprobs: Option<crate::models::CreateChatCompletionResponseLogprobs>,
25 #[serde(rename = "message")]
26 pub message: crate::models::ChatCompletionResponseMessage,
27}