pub struct CustomMessage {
pub contents: Option<Vec<ToolMessageStartContentsInner>>,
pub type: TypeTrue,
pub content: Option<String>,
}
Fields§
§contents: Option<Vec<ToolMessageStartContentsInner>>
This is an alternative to the content
property. It allows to specify variants of the same content, one per language. Usage: - If your assistants are multilingual, you can provide content for each language. - If you don’t provide content for a language, the first item in the array will be automatically translated to the active language at that moment. This will override the content
property.
type: TypeTrue
This is a custom message.
content: Option<String>
This is the content that the assistant will say when this message is triggered.
Implementations§
Source§impl CustomMessage
impl CustomMessage
pub fn new(type: TypeTrue) -> CustomMessage
Trait Implementations§
Source§impl Clone for CustomMessage
impl Clone for CustomMessage
Source§fn clone(&self) -> CustomMessage
fn clone(&self) -> CustomMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CustomMessage
impl Debug for CustomMessage
Source§impl Default for CustomMessage
impl Default for CustomMessage
Source§fn default() -> CustomMessage
fn default() -> CustomMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CustomMessage
impl<'de> Deserialize<'de> for CustomMessage
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 CustomMessage
impl PartialEq for CustomMessage
Source§impl Serialize for CustomMessage
impl Serialize for CustomMessage
impl StructuralPartialEq for CustomMessage
Auto Trait Implementations§
impl Freeze for CustomMessage
impl RefUnwindSafe for CustomMessage
impl Send for CustomMessage
impl Sync for CustomMessage
impl Unpin for CustomMessage
impl UnwindSafe for CustomMessage
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