Struct cohere_rust::api::summarize::SummarizeRequest
source · pub struct SummarizeRequest<'input> {
pub text: &'input str,
pub format: Option<SummarizeFormat>,
pub length: Option<SummarizeLength>,
pub extractiveness: Option<SummarizeExtractiveness>,
pub temperature: Option<f64>,
pub additional_command: Option<String>,
pub model: Option<GenerateModel>,
}
Fields§
§text: &'input str
Text to summarize
format: Option<SummarizeFormat>
‘One of paragraph
, bullets
or auto
, defaults to auto
.
Indicates the style in which the summary will be delivered - in a free form
paragraph or in bullet points.’
length: Option<SummarizeLength>
One of short
, medium
, long
or auto
defaults to auto
. Indicates the approximate length of the summary.’
extractiveness: Option<SummarizeExtractiveness>
One of low
, medium
, high
or auto
, defaults to auto
. Controls how close to the original text the summary is.
high
extractiveness summaries will lean towards reusing sentences verbatim, while low
extractiveness
summaries will tend to paraphrase more.’
temperature: Option<f64>
Ranges from 0 to 5. Controls the randomness of the output. Lower values tend to generate more “predictable” output, while higher values tend to generate more “creative” output. The sweet spot is typically between 0 and 1.
additional_command: Option<String>
A free-form instruction for modifying how the summaries get generated. Should complete the sentence “Generate a summary _”. Eg. “focusing on the next steps” or “written by Yoda”
model: Option<GenerateModel>
Denotes the summarization model to be used. Defaults to the best performing model