pub struct GenerateTextResult { /* private fields */ }Expand description
Result of a text generation call.
Implementations§
Source§impl GenerateTextResult
impl GenerateTextResult
Sourcepub fn text(&self) -> String
pub fn text(&self) -> String
Returns the generated text from the last step.
If the last step produced multiple text parts, they are concatenated.
Sourcepub fn tool_calls(&self) -> &[ToolCallPart]
pub fn tool_calls(&self) -> &[ToolCallPart]
Returns the tool calls from the last step.
Sourcepub fn tool_results(&self) -> &[ToolResultPart]
pub fn tool_results(&self) -> &[ToolResultPart]
Returns the tool results from the last step.
Sourcepub fn steps(&self) -> &[StepResult]
pub fn steps(&self) -> &[StepResult]
Returns the list of steps executed.
Sourcepub fn finish_reason(&self) -> &FinishReason
pub fn finish_reason(&self) -> &FinishReason
Returns the finish reason of the last step.
Auto Trait Implementations§
impl Freeze for GenerateTextResult
impl RefUnwindSafe for GenerateTextResult
impl Send for GenerateTextResult
impl Sync for GenerateTextResult
impl Unpin for GenerateTextResult
impl UnwindSafe for GenerateTextResult
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