pub struct Turn {
pub role: Option<String>,
pub content: Option<TurnContent>,
}Expand description
A turn in a conversation with role and content See: https://ai.google.dev/api/interactions-api#Resource:Turn
Fields§
§role: Option<String>Role: “user” or “model”
content: Option<TurnContent>Content can be array of Content or string
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Turn
impl<'de> Deserialize<'de> for Turn
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Turn
impl RefUnwindSafe for Turn
impl Send for Turn
impl Sync for Turn
impl Unpin for Turn
impl UnsafeUnpin for Turn
impl UnwindSafe for Turn
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