pub struct GenerateResult {
pub text: String,
pub usage: Option<TokenUsage>,
}Expand description
Result of a generate call, containing the text and optional usage information.
Fields§
§text: StringThe generated text
usage: Option<TokenUsage>Token usage information (if available from the provider)
Implementations§
Source§impl GenerateResult
impl GenerateResult
Sourcepub fn new(text: String, usage: Option<TokenUsage>) -> Self
pub fn new(text: String, usage: Option<TokenUsage>) -> Self
Create a new GenerateResult with text and usage
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GenerateResult
impl RefUnwindSafe for GenerateResult
impl Send for GenerateResult
impl Sync for GenerateResult
impl Unpin for GenerateResult
impl UnsafeUnpin 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