TextSummarizerOptions
class TextSummarizerOptions: TaskOptions, NSCopyingOptions for configuring a MediaPipe text summarizer task.
-
Cache directory for the model weight cache and program cache. By default, it will be set by LiteRT-LM engine based on the model file path.
To disable caching, set this to @":nocache".
Declaration
Swift
var cacheDirectory: String? { get set } -
The maximum number of tokens for summarization tasks. If set, the summarization will be truncated if the input and output exceed this value.
If not set, then the default maxNumTokens is based on the model's capacity.
Default is 0.
Declaration
Swift
var maxTokens: Int { get set } -
The mode of the text summarizer.
Default is MPPTextSummarizerModeKeyPoints.
Declaration
Swift
var mode: TextSummarizerMode { get set }