pub struct LarkMessageTool { /* private fields */ }Expand description
Send, update, or delete Feishu/Lark messages as an Agent tool.
§Actions
| Action | Description |
|---|---|
send | Send a new message (default when action omitted) |
update | Update the content of an existing message |
delete | Delete (recall) a message |
§Tool call format — send
{
"action": "send",
"receive_id_type": "chat_id",
"receive_id": "oc_xxx",
"msg_type": "text",
"content": "Hello!"
}§Tool call format — update
{
"action": "update",
"message_id": "om_xxx",
"msg_type": "interactive",
"content": "{\"config\":{...}}"
}§Tool call format — delete
{
"action": "delete",
"message_id": "om_xxx"
}receive_id_type can be "chat_id", "user_id", "email", or "open_id".
msg_type can be "text", "post", or "interactive".
For "text" the content field is a plain string; for other types it must be valid JSON.
Implementations§
Source§impl LarkMessageTool
impl LarkMessageTool
Sourcepub fn new(config: LarkConfig) -> Self
pub fn new(config: LarkConfig) -> Self
Create a new message tool.
Trait Implementations§
Source§impl Tool for LarkMessageTool
impl Tool for LarkMessageTool
fn name(&self) -> &'static str
fn description(&self) -> &'static str
fn parameters(&self) -> Option<Value>
fn call<'life0, 'async_trait>(
&'life0 self,
args: Value,
) -> Pin<Box<dyn Future<Output = Result<Value, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn as_tool_definition(&self) -> ToolDefinition
Auto Trait Implementations§
impl Freeze for LarkMessageTool
impl !RefUnwindSafe for LarkMessageTool
impl Send for LarkMessageTool
impl Sync for LarkMessageTool
impl Unpin for LarkMessageTool
impl UnsafeUnpin for LarkMessageTool
impl !UnwindSafe for LarkMessageTool
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