async_llm/completions/response.rs
1use serde::{Deserialize, Serialize};
2
3use crate::types::{CompletionChoice, CompletionUsage};
4
5#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
6pub struct CompletionResponse {
7 /// A unique identifier for the completion.
8 pub id: Option<String>,
9
10 /// The list of completion choices the model generated for the input prompt.
11 pub choices: Vec<CompletionChoice>,
12
13 /// The Unix timestamp (in seconds) of when the completion was created.
14 pub created: Option<u32>,
15
16 /// The model used for completion.
17 pub model: Option<String>,
18
19 /// This fingerprint represents the backend configuration that the model runs with.
20 ///
21 /// Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism.
22 pub system_fingerprint: Option<String>,
23
24 /// The object type, which is always `text_completion`
25 pub object: Option<String>,
26
27 /// Usage statistics for the completion request.
28 pub usage: Option<CompletionUsage>,
29}