openai_struct/models/
create_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 CreateCompletionResponse : Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
12
13#[allow(unused_imports)]
14use serde_json::Value;
15
16#[derive(Debug, Serialize, Deserialize)]
17pub struct CreateCompletionResponse {
18    /// The list of completion choices the model generated for the input prompt.
19    #[serde(rename = "choices")]
20    pub choices: Vec<crate::models::CreateCompletionResponseChoices>,
21    /// The Unix timestamp (in seconds) of when the completion was created.
22    #[serde(rename = "created")]
23    pub created: i32,
24    /// A unique identifier for the completion.
25    #[serde(rename = "id")]
26    pub id: String,
27    /// The model used for completion.
28    #[serde(rename = "model")]
29    pub model: String,
30    /// The object type, which is always \"text_completion\"
31    #[serde(rename = "object")]
32    pub object: String,
33    /// 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.
34    #[serde(rename = "system_fingerprint")]
35    pub system_fingerprint: Option<String>,
36    #[serde(rename = "usage")]
37    pub usage: Option<crate::models::CompletionUsage>,
38}