Struct endpoints::chat::ChatCompletionToolMessage
source · pub struct ChatCompletionToolMessage { /* private fields */ }Implementations§
source§impl ChatCompletionToolMessage
impl ChatCompletionToolMessage
sourcepub fn new(content: impl Into<String>, tool_call_id: impl Into<String>) -> Self
pub fn new(content: impl Into<String>, tool_call_id: impl Into<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) -> &str
pub fn tool_call_id(&self) -> &str
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.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 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
source§impl PartialEq for ChatCompletionToolMessage
impl PartialEq for ChatCompletionToolMessage
source§fn eq(&self, other: &ChatCompletionToolMessage) -> bool
fn eq(&self, other: &ChatCompletionToolMessage) -> bool
This method tests for
self and other values to be equal, and is used
by ==.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<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.