#[non_exhaustive]pub struct Content {
pub role: String,
pub parts: Vec<Part>,
/* private fields */
}Available on crate features
data-foundry-service or gen-ai-cache-service or gen-ai-tuning-service or llm-utility-service or prediction-service or vertex-rag-service only.Expand description
The base structured datatype containing multi-part content of a message.
A Content includes a role field designating the producer of the Content
and a parts field containing multi-part data that contains the content of
the message turn.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.role: StringOptional. The producer of the content. Must be either ‘user’ or ‘model’.
Useful to set for multi-turn conversations, otherwise can be left blank or unset.
parts: Vec<Part>Required. Ordered Parts that constitute a single message. Parts may have
different IANA MIME types.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Content
Auto Trait Implementations§
impl Freeze for Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnwindSafe for Content
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more