pub struct CreateCompletionResponse {
pub id: String,
pub choices: Vec<CreateCompletionResponse_Choices>,
pub created: i64,
pub model: String,
pub system_fingerprint: Option<String>,
pub object: String,
pub usage: Option<CompletionUsage>,
}
Expand description
Represents a completion response from the API.
Fields§
§id: String
A unique identifier for the completion.
choices: Vec<CreateCompletionResponse_Choices>
The list of completion choices the model generated for the input prompt.
created: i64
The Unix timestamp (in seconds) of when the completion was created.
model: String
The model used for completion.
system_fingerprint: Option<String>
This fingerprint represents the backend configuration that the model runs with.
object: String
The object type, which is always “text_completion”
usage: Option<CompletionUsage>
Trait Implementations§
Source§impl Clone for CreateCompletionResponse
impl Clone for CreateCompletionResponse
Source§fn clone(&self) -> CreateCompletionResponse
fn clone(&self) -> CreateCompletionResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CreateCompletionResponse
impl Debug for CreateCompletionResponse
Source§impl Default for CreateCompletionResponse
impl Default for CreateCompletionResponse
Source§fn default() -> CreateCompletionResponse
fn default() -> CreateCompletionResponse
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateCompletionResponse
impl RefUnwindSafe for CreateCompletionResponse
impl Send for CreateCompletionResponse
impl Sync for CreateCompletionResponse
impl Unpin for CreateCompletionResponse
impl UnwindSafe for CreateCompletionResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more