# TextFormatContext

    class TextFormatContext: NSObject

Encapsulates formatting instructions for models that require a specific prompt format.
- `
  ### [embeddingType](https://developers.google.com/edge/api/mediapipe/swift/text/Classes/TextFormatContext.md.txt#/c:objc(cs)MPPTextFormatContext(py)embeddingType)

  ` The embedding type of type `MPPEmbeddingType`.

  #### Declaration

  Swift

      var embeddingType: MPPEmbeddingType { get set }

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

  ` The role of the text of type `MPPTextRole`. Defaults to `MPPTextRoleQuery`.

  #### Declaration

  Swift

      var textRole: MPPTextRole { get set }

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

  ` The title of the text. This is only used for `MPPEmbeddingTypeRetrievalDocument`.

  #### Declaration

  Swift

      var title: String? { get set }