pub struct Summary { /* private fields */ }Expand description
Summary definition
Implementations§
Source§impl Summary
Summary implementation
impl Summary
Summary implementation
Sourcepub fn with_url_token(url: &str, token: &str) -> Summary
pub fn with_url_token(url: &str, token: &str) -> Summary
Sourcepub async fn summary(
&self,
text: &str,
minlength: Option<i32>,
maxlength: Option<i32>,
) -> Strings
pub async fn summary( &self, text: &str, minlength: Option<i32>, maxlength: Option<i32>, ) -> Strings
Runs a summarization model against a block of text.
§Arguments
texttext to summarizeminlengthminimum length for summarymaxlengthmaximum length for summary
Sourcepub async fn batchsummary(
&self,
texts: &Vec<&str>,
minlength: Option<i32>,
maxlength: Option<i32>,
) -> StringsBatch
pub async fn batchsummary( &self, texts: &Vec<&str>, minlength: Option<i32>, maxlength: Option<i32>, ) -> StringsBatch
Runs a summarization model against a block of text.
§Arguments
textslist of text to summarizeminlengthminimum length for summarymaxlengthmaximum length for summary
Auto Trait Implementations§
impl Freeze for Summary
impl RefUnwindSafe for Summary
impl Send for Summary
impl Sync for Summary
impl Unpin for Summary
impl UnsafeUnpin for Summary
impl UnwindSafe for Summary
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