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
11#[allow(unused_imports)]
12use serde_json::Value;
13
14#[derive(Debug, Serialize, Deserialize)]
15pub struct CreateChatCompletionResponseChoices {
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, `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.
17 #[serde(rename = "finish_reason")]
18 pub finish_reason: String,
19 /// The index of the choice in the list of choices.
20 #[serde(rename = "index")]
21 pub index: i32,
22 #[serde(rename = "logprobs")]
23 pub logprobs: crate::models::CreateChatCompletionResponseLogprobs,
24 #[serde(rename = "message")]
25 pub message: crate::models::ChatCompletionResponseMessage,
26}