text

fun text(value: String, mime: String = definedExternally): LanguageModelDataPart(source)

Create a new {@linkcode LanguageModelDataPart} for text.

Note that an UTF-8 encoder is used to create bytes for the string.

Parameters

value

Text data

mime

The MIME type if any. Common values are text/plain and text/markdown.

Online Documentation