pub struct InputImageContent {
pub detail: ImageDetail,
pub file_id: Option<String>,
pub image_url: Option<String>,
pub type_: InputImageContentType,
}Expand description
An image input to the model. Learn about image inputs.
JSON schema
{
"title": "Input image",
"description": "An image input to the model. Learn about [image inputs](/docs/guides/vision).",
"type": "object",
"required": [
"detail",
"type"
],
"properties": {
"detail": {
"$ref": "#/components/schemas/ImageDetail"
},
"file_id": {
"anyOf": [
{
"description": "The ID of the file to be sent to the model.",
"type": "string"
}
]
},
"image_url": {
"anyOf": [
{
"description": "The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL.",
"type": "string",
"format": "uri"
}
]
},
"type": {
"description": "The type of the input item. Always `input_image`.",
"type": "string",
"enum": [
"input_image"
],
"x-stainless-const": true
}
}
}Fields§
§detail: ImageDetail§file_id: Option<String>§image_url: Option<String>§type_: InputImageContentTypeThe type of the input item. Always input_image.
Trait Implementations§
Source§impl Clone for InputImageContent
impl Clone for InputImageContent
Source§fn clone(&self) -> InputImageContent
fn clone(&self) -> InputImageContent
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 InputImageContent
impl Debug for InputImageContent
Source§impl<'de> Deserialize<'de> for InputImageContent
impl<'de> Deserialize<'de> for InputImageContent
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<InputImageContent> for FunctionAndCustomToolCallOutput
impl From<InputImageContent> for FunctionAndCustomToolCallOutput
Source§fn from(value: InputImageContent) -> Self
fn from(value: InputImageContent) -> Self
Converts to this type from the input type.
Source§impl From<InputImageContent> for InputContent
impl From<InputImageContent> for InputContent
Source§fn from(value: InputImageContent) -> Self
fn from(value: InputImageContent) -> Self
Converts to this type from the input type.
Source§impl From<InputImageContent> for MessageContentItem
impl From<InputImageContent> for MessageContentItem
Source§fn from(value: InputImageContent) -> Self
fn from(value: InputImageContent) -> Self
Converts to this type from the input type.
Source§impl From<InputImageContent> for ResponsePromptVariablesValue
impl From<InputImageContent> for ResponsePromptVariablesValue
Source§fn from(value: InputImageContent) -> Self
fn from(value: InputImageContent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InputImageContent
impl RefUnwindSafe for InputImageContent
impl Send for InputImageContent
impl Sync for InputImageContent
impl Unpin for InputImageContent
impl UnsafeUnpin for InputImageContent
impl UnwindSafe for InputImageContent
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