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/// todo: 长,改天看
17#[derive(Debug, Serialize, Deserialize)]
18pub struct CreateCompletionResponse {
19    /// The list of completion choices the model generated for the input prompt.
20    #[serde(rename = "choices")]
21    pub choices: Vec<crate::models::CreateCompletionResponseChoices>,
22    /// The Unix timestamp (in seconds) of when the completion was created.
23    #[serde(rename = "created")]
24    pub created: i32,
25    /// A unique identifier for the completion.
26    #[serde(rename = "id")]
27    pub id: String,
28    /// The model used for completion.
29    #[serde(rename = "model")]
30    pub model: String,
31    /// The object type, which is always \"text_completion\"
32    #[serde(rename = "object")]
33    pub object: String,
34    /// 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.
35    #[serde(rename = "system_fingerprint")]
36    pub system_fingerprint: Option<String>,
37    #[serde(rename = "usage")]
38    pub usage: Option<crate::models::CompletionUsage>,
39}