Construct a generic data part with the given content.
The byte data for this part.
The mime type of the data.
The byte data for this part.
The mime type which determines how the data property is interpreted.
StaticimageCreate a new LanguageModelDataPart for an image.
Binary image data
The MIME type of the image. Common values are image/png and image/jpeg.
StaticjsonCreate a new LanguageModelDataPart for a json.
Note that this function is not expecting "stringified JSON" but an object that can be stringified. This function will throw an error when the passed value cannot be JSON-stringified.
A JSON-stringifyable value.
Optionalmime: stringOptional MIME type, defaults to application/json
StatictextCreate a new LanguageModelDataPart for text.
Note that an UTF-8 encoder is used to create bytes for the string.
Text data
Optionalmime: stringThe MIME type if any. Common values are text/plain and text/markdown.
A language model response part containing arbitrary data. Can be used in responses, chat messages, tool results, and other language model interactions.
Stubbed