pub struct Completion {
pub id: String,
pub object: String,
pub created: Option<i64>,
pub model: String,
pub choices: Vec<CompletionChoice>,
pub usage: Option<CompletionUsage>,
pub system_fingerprint: Option<String>,
pub extra: BTreeMap<String, Value>,
}Expand description
表示 legacy completions 接口返回值。
Fields§
§id: String补全 ID。
object: String对象类型。
created: Option<i64>创建时间。
model: String模型 ID。
choices: Vec<CompletionChoice>候选项。
usage: Option<CompletionUsage>用量统计。
system_fingerprint: Option<String>系统指纹。
extra: BTreeMap<String, Value>额外字段。
Trait Implementations§
Source§impl Clone for Completion
impl Clone for Completion
Source§fn clone(&self) -> Completion
fn clone(&self) -> Completion
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 Completion
impl Debug for Completion
Source§impl Default for Completion
impl Default for Completion
Source§fn default() -> Completion
fn default() -> Completion
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for Completion
impl<'de> Deserialize<'de> for Completion
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Completion
impl RefUnwindSafe for Completion
impl Send for Completion
impl Sync for Completion
impl Unpin for Completion
impl UnsafeUnpin for Completion
impl UnwindSafe for Completion
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