pub struct ChatResult {
pub message: Message,
pub generation_info: Option<HashMap<String, Value>>,
pub cost: Option<CostEstimate>,
}Expand description
The output of a chat model invocation.
Fields§
§message: MessageThe AI response message.
generation_info: Option<HashMap<String, Value>>Additional generation info from the provider.
cost: Option<CostEstimate>Estimated cost of this invocation.
Trait Implementations§
Source§impl Clone for ChatResult
impl Clone for ChatResult
Source§fn clone(&self) -> ChatResult
fn clone(&self) -> ChatResult
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 ChatResult
impl Debug for ChatResult
Source§impl<'de> Deserialize<'de> for ChatResult
impl<'de> Deserialize<'de> for ChatResult
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 ChatResult
impl RefUnwindSafe for ChatResult
impl Send for ChatResult
impl Sync for ChatResult
impl Unpin for ChatResult
impl UnsafeUnpin for ChatResult
impl UnwindSafe for ChatResult
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