pub struct GenerateResult {
pub tokens: TokenUsage,
pub generation: String,
pub call_tools: Vec<CallInfo>,
}Expand description
Result of a text generation from an LLM.
Fields§
§tokens: TokenUsage§generation: String§call_tools: Vec<CallInfo>Optional structured tool calls the LLM signaled during this generation. Each entry contains the tool name and the arguments object the LLM wants the agent to pass when invoking that tool.
Trait Implementations§
Source§impl Clone for GenerateResult
impl Clone for GenerateResult
Source§fn clone(&self) -> GenerateResult
fn clone(&self) -> GenerateResult
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 GenerateResult
impl Debug for GenerateResult
Source§impl Default for GenerateResult
impl Default for GenerateResult
Source§fn default() -> GenerateResult
fn default() -> GenerateResult
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenerateResult
impl<'de> Deserialize<'de> for GenerateResult
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 GenerateResult
impl RefUnwindSafe for GenerateResult
impl Send for GenerateResult
impl Sync for GenerateResult
impl Unpin for GenerateResult
impl UnwindSafe for GenerateResult
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