pub struct FunctionMessageChunk { /* private fields */ }Expand description
Function message chunk (yielded when streaming).
This corresponds to FunctionMessageChunk in LangChain Python.
Implementations§
Source§impl FunctionMessageChunk
impl FunctionMessageChunk
Sourcepub fn new(name: impl Into<String>, content: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, content: impl Into<String>) -> Self
Create a new function message chunk.
Sourcepub fn with_id(
id: impl Into<String>,
name: impl Into<String>,
content: impl Into<String>,
) -> Self
pub fn with_id( id: impl Into<String>, name: impl Into<String>, content: impl Into<String>, ) -> Self
Create a new function message chunk with an ID.
Sourcepub fn additional_kwargs(&self) -> &HashMap<String, Value>
pub fn additional_kwargs(&self) -> &HashMap<String, Value>
Get additional kwargs.
Sourcepub fn response_metadata(&self) -> &HashMap<String, Value>
pub fn response_metadata(&self) -> &HashMap<String, Value>
Get response metadata.
Sourcepub fn concat(&self, other: &FunctionMessageChunk) -> FunctionMessageChunk
pub fn concat(&self, other: &FunctionMessageChunk) -> FunctionMessageChunk
Sourcepub fn to_message(&self) -> FunctionMessage
pub fn to_message(&self) -> FunctionMessage
Convert this chunk to a complete FunctionMessage.
Trait Implementations§
Source§impl Add for FunctionMessageChunk
impl Add for FunctionMessageChunk
Source§type Output = FunctionMessageChunk
type Output = FunctionMessageChunk
The resulting type after applying the
+ operator.Source§fn add(self, other: FunctionMessageChunk) -> FunctionMessageChunk
fn add(self, other: FunctionMessageChunk) -> FunctionMessageChunk
Performs the
+ operation. Read moreSource§impl Clone for FunctionMessageChunk
impl Clone for FunctionMessageChunk
Source§fn clone(&self) -> FunctionMessageChunk
fn clone(&self) -> FunctionMessageChunk
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 FunctionMessageChunk
impl Debug for FunctionMessageChunk
Source§impl<'de> Deserialize<'de> for FunctionMessageChunk
impl<'de> Deserialize<'de> for FunctionMessageChunk
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<FunctionMessageChunk> for BaseMessageChunk
impl From<FunctionMessageChunk> for BaseMessageChunk
Source§fn from(chunk: FunctionMessageChunk) -> Self
fn from(chunk: FunctionMessageChunk) -> Self
Converts to this type from the input type.
Source§impl PartialEq for FunctionMessageChunk
impl PartialEq for FunctionMessageChunk
Source§impl Serialize for FunctionMessageChunk
impl Serialize for FunctionMessageChunk
impl StructuralPartialEq for FunctionMessageChunk
Auto Trait Implementations§
impl Freeze for FunctionMessageChunk
impl RefUnwindSafe for FunctionMessageChunk
impl Send for FunctionMessageChunk
impl Sync for FunctionMessageChunk
impl Unpin for FunctionMessageChunk
impl UnwindSafe for FunctionMessageChunk
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