Part

@Serializable
data class Part(val text: String? = null, val inlineData: InlineData? = null, val functionCall: FunctionCall? = null, val functionResponse: FunctionResponse? = null, val fileData: FileData? = null)

Represents a part of content, which can be one of several types such as text, inline data, function call, function response, or file data.

Constructors

Link copied to clipboard
constructor(text: String? = null, inlineData: InlineData? = null, functionCall: FunctionCall? = null, functionResponse: FunctionResponse? = null, fileData: FileData? = null)

Properties

Link copied to clipboard
val fileData: FileData? = null

Information about a file associated with this part, if any. Null if this part does not include file data.

Link copied to clipboard

A call to a function represented by this part, if applicable. Null if this part does not invoke a function.

Link copied to clipboard

The response from a function call, if this part represents such a response. Null if there is no function response.

Link copied to clipboard
@SerialName(value = "inline_data")
val inlineData: InlineData? = null

Data embedded directly within this part, if present. Null if no inline data is included.

Link copied to clipboard
val text: String? = null

The plain text content of the part, if available. Null if this part does not contain text.