openai_struct/models/
create_chat_completion_response.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/// pub CreateChatCompletionResponse : Represents a chat completion response returned by model, based on the provided input.
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct CreateChatCompletionResponse {
18    /// A list of chat completion choices. Can be more than one if `n` is greater than 1.
19    #[serde(rename = "choices")]
20    pub choices: Vec<crate::models::CreateChatCompletionResponseChoices>,
21    /// The Unix timestamp (in seconds) of when the chat completion was created.
22    #[serde(rename = "created")]
23    pub created: i32,
24    /// A unique identifier for the chat completion.
25    #[serde(rename = "id")]
26    pub id: String,
27    /// The model used for the chat completion.
28    #[serde(rename = "model")]
29    pub model: String,
30    /// The object type, which is always `chat.completion`.
31    #[serde(rename = "object")]
32    pub object: String,
33    #[serde(rename = "service_tier")]
34    pub service_tier: Option<crate::models::ServiceTier>,
35    /// This fingerprint represents the backend configuration that the model runs with.  Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
36    #[serde(rename = "system_fingerprint")]
37    pub system_fingerprint: Option<String>,
38    #[serde(rename = "usage")]
39    pub usage: Option<crate::models::CompletionUsage>,
40}