pub struct ChatCompletionToolMessage { /* private fields */ }Expand description
Defines the content of a tool message.
Implementations§
source§impl ChatCompletionToolMessage
impl ChatCompletionToolMessage
sourcepub fn new(content: impl Into<String>, tool_call_id: Option<String>) -> Self
pub fn new(content: impl Into<String>, tool_call_id: Option<String>) -> Self
Creates a new tool message.
§Arguments
-
content- The contents of the tool message. -
tool_call_id- Tool call that this message is responding to.
sourcepub fn role(&self) -> ChatCompletionRole
pub fn role(&self) -> ChatCompletionRole
The role of the messages author, in this case tool.
sourcepub fn tool_call_id(&self) -> Option<String>
pub fn tool_call_id(&self) -> Option<String>
Tool call that this message is responding to.
Trait Implementations§
source§impl Clone for ChatCompletionToolMessage
impl Clone for ChatCompletionToolMessage
source§fn clone(&self) -> ChatCompletionToolMessage
fn clone(&self) -> ChatCompletionToolMessage
Returns a copy of the value. Read more
1.6.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 ChatCompletionToolMessage
impl Debug for ChatCompletionToolMessage
source§impl<'de> Deserialize<'de> for ChatCompletionToolMessage
impl<'de> Deserialize<'de> for ChatCompletionToolMessage
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
impl Eq for ChatCompletionToolMessage
impl StructuralPartialEq for ChatCompletionToolMessage
Auto Trait Implementations§
impl Freeze for ChatCompletionToolMessage
impl RefUnwindSafe for ChatCompletionToolMessage
impl Send for ChatCompletionToolMessage
impl Sync for ChatCompletionToolMessage
impl Unpin for ChatCompletionToolMessage
impl UnwindSafe for ChatCompletionToolMessage
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.