pub enum ResponseContentPart {
InputText {
text: String,
},
InputImage {
image_url: String,
detail: Option<String>,
},
OutputText {
text: String,
annotations: Vec<Value>,
},
}Expand description
A single content part of a Responses message. The wire "type" token matches the set
variant; note input_image.image_url is a plain string (not the chat dialect’s
{url} object) and output_text always carries an annotations array.
Variants§
Implementations§
Source§impl ResponseContentPart
impl ResponseContentPart
Sourcepub fn input_text(text: impl Into<String>) -> Self
pub fn input_text(text: impl Into<String>) -> Self
An input_text part.
Sourcepub fn input_image(image_url: impl Into<String>) -> Self
pub fn input_image(image_url: impl Into<String>) -> Self
An input_image part; image_url is a plain string here.
Sourcepub fn output_text(text: impl Into<String>) -> Self
pub fn output_text(text: impl Into<String>) -> Self
An output_text part; annotations starts empty (serialises as []).
Trait Implementations§
Source§impl Clone for ResponseContentPart
impl Clone for ResponseContentPart
Source§fn clone(&self) -> ResponseContentPart
fn clone(&self) -> ResponseContentPart
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResponseContentPart
impl Debug for ResponseContentPart
Source§impl<'de> Deserialize<'de> for ResponseContentPart
impl<'de> Deserialize<'de> for ResponseContentPart
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
Source§impl PartialEq for ResponseContentPart
impl PartialEq for ResponseContentPart
Source§impl Serialize for ResponseContentPart
impl Serialize for ResponseContentPart
impl StructuralPartialEq for ResponseContentPart
Auto Trait Implementations§
impl Freeze for ResponseContentPart
impl RefUnwindSafe for ResponseContentPart
impl Send for ResponseContentPart
impl Sync for ResponseContentPart
impl Unpin for ResponseContentPart
impl UnsafeUnpin for ResponseContentPart
impl UnwindSafe for ResponseContentPart
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