pub struct ImagePromptValue {
pub image_url: ImageURL,
}Expand description
Image prompt value.
A prompt value containing an image URL.
Corresponds to ImagePromptValue in Python.
Fields§
§image_url: ImageURLImage URL.
Implementations§
Source§impl ImagePromptValue
impl ImagePromptValue
Sourcepub fn from_url(url: impl Into<String>) -> Self
pub fn from_url(url: impl Into<String>) -> Self
Create a new ImagePromptValue from a URL string.
Sourcepub fn from_url_with_detail(
url: impl Into<String>,
detail: ImageDetailLevel,
) -> Self
pub fn from_url_with_detail( url: impl Into<String>, detail: ImageDetailLevel, ) -> Self
Create a new ImagePromptValue from a URL string with detail level.
Trait Implementations§
Source§impl Clone for ImagePromptValue
impl Clone for ImagePromptValue
Source§fn clone(&self) -> ImagePromptValue
fn clone(&self) -> ImagePromptValue
Returns a duplicate of the value. Read more
1.0.0 · 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 ImagePromptValue
impl Debug for ImagePromptValue
Source§impl<'de> Deserialize<'de> for ImagePromptValue
impl<'de> Deserialize<'de> for ImagePromptValue
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<ImagePromptValue> for LanguageModelInput
impl From<ImagePromptValue> for LanguageModelInput
Source§fn from(p: ImagePromptValue) -> Self
fn from(p: ImagePromptValue) -> Self
Converts to this type from the input type.
Source§impl PartialEq for ImagePromptValue
impl PartialEq for ImagePromptValue
Source§impl PromptValue for ImagePromptValue
impl PromptValue for ImagePromptValue
Source§fn to_messages(&self) -> Vec<BaseMessage>
fn to_messages(&self) -> Vec<BaseMessage>
Return prompt as a list of messages.
Source§impl Serializable for ImagePromptValue
impl Serializable for ImagePromptValue
Source§fn get_lc_namespace() -> Vec<String>where
Self: Sized,
fn get_lc_namespace() -> Vec<String>where
Self: Sized,
Get the namespace of the LangChain object. Read more
Source§fn lc_secrets(&self) -> HashMap<String, String>
fn lc_secrets(&self) -> HashMap<String, String>
A map of constructor argument names to secret ids. Read more
Source§fn lc_attributes(&self) -> HashMap<String, Value>
fn lc_attributes(&self) -> HashMap<String, Value>
List of attribute names that should be included in the serialized kwargs. Read more
Source§fn lc_id() -> Vec<String>where
Self: Sized,
fn lc_id() -> Vec<String>where
Self: Sized,
Return a unique identifier for this class for serialization purposes. Read more
Source§fn lc_type_name(&self) -> &'static str
fn lc_type_name(&self) -> &'static str
Get the type name of this object.
Source§fn to_json(&self) -> Serialized
fn to_json(&self) -> Serialized
Serialize this object to JSON. Read more
Source§fn to_json_not_implemented(&self) -> Serialized
fn to_json_not_implemented(&self) -> Serialized
Serialize a “not implemented” object.
Source§impl Serialize for ImagePromptValue
impl Serialize for ImagePromptValue
impl StructuralPartialEq for ImagePromptValue
Auto Trait Implementations§
impl Freeze for ImagePromptValue
impl RefUnwindSafe for ImagePromptValue
impl Send for ImagePromptValue
impl Sync for ImagePromptValue
impl Unpin for ImagePromptValue
impl UnwindSafe for ImagePromptValue
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