pub struct SampleResponse {
pub id: String,
pub object: String,
pub created: i64,
pub model: String,
pub choices: Vec<SampleChoice>,
pub system_fingerprint: Option<String>,
pub usage: Option<Usage>,
}Expand description
(Legacy) Response for /v1/completions endpoint.
Fields§
§id: StringID of the request.
object: StringObject type of the response. This is always "text_completion".
created: i64The chat completion creation time in Unix timestamp.
model: StringModel used.
choices: Vec<SampleChoice>A list of response choices from the model.
system_fingerprint: Option<String>System fingerprint, used to indicate xAI system configuration changes.
usage: Option<Usage>Token usage information.
Trait Implementations§
Source§impl Clone for SampleResponse
impl Clone for SampleResponse
Source§fn clone(&self) -> SampleResponse
fn clone(&self) -> SampleResponse
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 SampleResponse
impl Debug for SampleResponse
Source§impl Default for SampleResponse
impl Default for SampleResponse
Source§fn default() -> SampleResponse
fn default() -> SampleResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SampleResponse
impl<'de> Deserialize<'de> for SampleResponse
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
Source§impl PartialEq for SampleResponse
impl PartialEq for SampleResponse
Source§impl Serialize for SampleResponse
impl Serialize for SampleResponse
impl StructuralPartialEq for SampleResponse
Auto Trait Implementations§
impl Freeze for SampleResponse
impl RefUnwindSafe for SampleResponse
impl Send for SampleResponse
impl Sync for SampleResponse
impl Unpin for SampleResponse
impl UnwindSafe for SampleResponse
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