pub enum InputContentPart {
Text(TextContentPart),
Image(ImageContentPart),
ImageFile(ImageFileContentPart),
}Expand description
Input content part - text, image, and image_file (for user input)
This is a subset of ContentPart that users can send. Tool calls and results are system-generated.
Variants§
Text(TextContentPart)
Text content
Image(ImageContentPart)
Image content (base64 or URL)
ImageFile(ImageFileContentPart)
Image file content (reference to uploaded image by ID)
Implementations§
Source§impl InputContentPart
impl InputContentPart
Sourcepub fn image_file(image_id: ImageId) -> Self
pub fn image_file(image_id: ImageId) -> Self
Create an image file content part (reference to uploaded image)
Sourcepub fn content_type(&self) -> ContentType
pub fn content_type(&self) -> ContentType
Get the content type
Trait Implementations§
Source§impl Clone for InputContentPart
impl Clone for InputContentPart
Source§fn clone(&self) -> InputContentPart
fn clone(&self) -> InputContentPart
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 InputContentPart
impl Debug for InputContentPart
Source§impl<'de> Deserialize<'de> for InputContentPart
impl<'de> Deserialize<'de> for InputContentPart
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 From<InputContentPart> for ContentPart
impl From<InputContentPart> for ContentPart
Source§fn from(input: InputContentPart) -> Self
fn from(input: InputContentPart) -> Self
Converts to this type from the input type.
Source§impl PartialEq for InputContentPart
impl PartialEq for InputContentPart
Source§fn eq(&self, other: &InputContentPart) -> bool
fn eq(&self, other: &InputContentPart) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for InputContentPart
impl Serialize for InputContentPart
impl StructuralPartialEq for InputContentPart
Auto Trait Implementations§
impl Freeze for InputContentPart
impl RefUnwindSafe for InputContentPart
impl Send for InputContentPart
impl Sync for InputContentPart
impl Unpin for InputContentPart
impl UnsafeUnpin for InputContentPart
impl UnwindSafe for InputContentPart
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request