pub struct StringPromptValue {
pub text: String,
}Expand description
String prompt value.
A simple prompt value containing just text content.
Corresponds to StringPromptValue in Python.
Fields§
§text: StringPrompt text.
Implementations§
Trait Implementations§
Source§impl Clone for StringPromptValue
impl Clone for StringPromptValue
Source§fn clone(&self) -> StringPromptValue
fn clone(&self) -> StringPromptValue
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 StringPromptValue
impl Debug for StringPromptValue
Source§impl<'de> Deserialize<'de> for StringPromptValue
impl<'de> Deserialize<'de> for StringPromptValue
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<StringPromptValue> for LanguageModelInput
impl From<StringPromptValue> for LanguageModelInput
Source§fn from(p: StringPromptValue) -> Self
fn from(p: StringPromptValue) -> Self
Converts to this type from the input type.
Source§impl PartialEq for StringPromptValue
impl PartialEq for StringPromptValue
Source§impl PromptValue for StringPromptValue
impl PromptValue for StringPromptValue
Source§fn to_messages(&self) -> Vec<BaseMessage>
fn to_messages(&self) -> Vec<BaseMessage>
Return prompt as a list of messages.
Source§impl Serializable for StringPromptValue
impl Serializable for StringPromptValue
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 StringPromptValue
impl Serialize for StringPromptValue
impl StructuralPartialEq for StringPromptValue
Auto Trait Implementations§
impl Freeze for StringPromptValue
impl RefUnwindSafe for StringPromptValue
impl Send for StringPromptValue
impl Sync for StringPromptValue
impl Unpin for StringPromptValue
impl UnwindSafe for StringPromptValue
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