pub struct ModelResponse {
pub content: Vec<Part>,
pub usage: Option<ModelUsage>,
pub cost: Option<f64>,
}Expand description
Represents the response generated by the model.
Fields§
§content: Vec<Part>§usage: Option<ModelUsage>§cost: Option<f64>The cost of the response.
Trait Implementations§
Source§impl Clone for ModelResponse
impl Clone for ModelResponse
Source§fn clone(&self) -> ModelResponse
fn clone(&self) -> ModelResponse
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 ModelResponse
impl Debug for ModelResponse
Source§impl Default for ModelResponse
impl Default for ModelResponse
Source§fn default() -> ModelResponse
fn default() -> ModelResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelResponse
impl<'de> Deserialize<'de> for ModelResponse
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 From<ModelResponse> for MockGenerateResult
impl From<ModelResponse> for MockGenerateResult
Source§fn from(response: ModelResponse) -> Self
fn from(response: ModelResponse) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ModelResponse
impl PartialEq for ModelResponse
Source§impl Serialize for ModelResponse
impl Serialize for ModelResponse
impl StructuralPartialEq for ModelResponse
Auto Trait Implementations§
impl Freeze for ModelResponse
impl RefUnwindSafe for ModelResponse
impl Send for ModelResponse
impl Sync for ModelResponse
impl Unpin for ModelResponse
impl UnwindSafe for ModelResponse
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