Represents a semantically meaningful content unit exchanged between the model and the user.
Conceptually, each Part encapsulates a piece of data that contributes
to a chat message — such as text, a function invocation, or an image.
For example, a single message consisting of a sequence like
(text..., image, text...) is represented as a Message containing
an array of three Part elements.
Note that a Part does not carry "intent", such as "reasoning" or "tool call".
These higher-level semantics are determined by the context of a [Message].
Represents a semantically meaningful content unit exchanged between the model and the user.
Conceptually, each
Partencapsulates a piece of data that contributes to a chat message — such as text, a function invocation, or an image.For example, a single message consisting of a sequence like
(text..., image, text...)is represented as aMessagecontaining an array of threePartelements.Note that a
Partdoes not carry "intent", such as "reasoning" or "tool call". These higher-level semantics are determined by the context of a [Message].Example
Rust