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, val executableCode: ExecutableCode? = null, val codeExecutionResult: CodeExecutionResult? = 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, executableCode: ExecutableCode? = null, codeExecutionResult: CodeExecutionResult? = null)

Properties

Link copied to clipboard

Information about code execution result associated with this part, if any.

Link copied to clipboard

Information about executable code associated with this part, if any.

Link copied to clipboard

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

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

Link copied to clipboard
val text: String?

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