Part

public interface Part

Known direct subclasses
FileDataPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FunctionCallPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

FunctionResponsePart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

ImagePart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

InlineDataPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.

TextPart

This class is deprecated. The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.


Interface representing data sent to and received from requests.

Summary

Extension functions

default final FileDataPart

Returns the part as a FileDataPart if it represents a file, and null otherwise

default final Bitmap

Returns the part as a Bitmap if it represents an image, and null otherwise

default final InlineDataPart

Returns the part as a InlineDataPart if it represents inline data, and null otherwise

default final String

Returns the part as a String if it represents text, and null otherwise

Extension functions

PartKt.asFileDataOrNull

default final FileDataPart PartKt.asFileDataOrNull(@NonNull Part receiver)

Returns the part as a FileDataPart if it represents a file, and null otherwise

PartKt.asImageOrNull

default final Bitmap PartKt.asImageOrNull(@NonNull Part receiver)

Returns the part as a Bitmap if it represents an image, and null otherwise

PartKt.asInlineDataPartOrNull

default final InlineDataPart PartKt.asInlineDataPartOrNull(@NonNull Part receiver)

Returns the part as a InlineDataPart if it represents inline data, and null otherwise

PartKt.asTextOrNull

default final String PartKt.asTextOrNull(@NonNull Part receiver)

Returns the part as a String if it represents text, and null otherwise