# TextSummarizerOptions

    class TextSummarizerOptions: TaskOptions, NSCopying

Options for configuring a MediaPipe text summarizer task.
- `
  ### [cacheDirectory](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextSummarizerOptions.md.txt#/c:objc(cs)MPPTextSummarizerOptions(py)cacheDir)

  ` 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 }

- `
  ### [maxNumTokens](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextSummarizerOptions.md.txt#/c:objc(cs)MPPTextSummarizerOptions(py)maxNumTokens)

  ` 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 maxNumTokens: Int { get set }

- `
  ### [maxTokens](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextSummarizerOptions.md.txt#/c:objc(cs)MPPTextSummarizerOptions(py)maxTokens)

  `

  #### Declaration

  Swift

      var maxTokens: Int { get set }

- `
  ### [mode](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextSummarizerOptions.md.txt#/c:objc(cs)MPPTextSummarizerOptions(py)mode)

  ` The mode of the text summarizer.

  Default is MPPTextSummarizerModeKeyPoints.

  #### Declaration

  Swift

      var mode: TextSummarizerMode { get set }