SlackRetrieveTool - AG2
SlackRetrieveTool
autogen.tools.experimental.SlackRetrieveTool
SlackRetrieveTool(*, bot_token, channel_id)
Bases: Tool
Retrieves messages from a Slack channel.
Parameters
| PARAMETER | DESCRIPTION |
|---|---|
bot_token |
Bot User OAuth Token starting with "xoxb-". TYPE: str |
channel_id |
Channel ID where messages will be sent. TYPE: str |
Source code in autogen/tools/experimental/messageplatform/slack/slack.py
def __init__(self, *, bot_token: str, channel_id: str) -> None:
"""Initialize the SlackRetrieveTool.
Args:
bot_token: Bot User OAuth Token starting with "xoxb-".
channel_id: Channel ID where messages will be sent.
"""
name property
name
description property
description
func property
func
tool_schema property
Get the schema for the tool.
function_schema property
Get the schema for the function.
realtime_tool_schema property
Get the schema for the tool.
register_for_llm
register_for_llm(agent)
Registers the tool for use with a ConversableAgent's language model (LLM).
| PARAMETER | DESCRIPTION |
|---|---|
agent |
The agent to which the tool will be registered. TYPE: ConversableAgent |
Source code in autogen/tools/tool.py
def register_for_llm(self, agent: "ConversableAgent") -> None:
"""Registers the tool for use with a ConversableAgent's language model (LLM).
Args:
agent (ConversableAgent): The agent to which the tool will be registered.
"""
register_for_execution
register_for_execution(agent)
Registers the tool for direct execution by a ConversableAgent.
| PARAMETER | DESCRIPTION |
|---|---|
agent |
The agent to which the tool will be registered. TYPE: ConversableAgent |
Source code in autogen/tools/tool.py
def register_for_execution(self, agent: "ConversableAgent") -> None:
"""Registers the tool for direct execution by a ConversableAgent.
Args:
agent (ConversableAgent): The agent to which the tool will be registered.
"""
register_tool
register_tool(agent)
Register a tool to be both proposed and executed by an agent.
Source code in autogen/tools/tool.py
def register_tool(self, agent: "ConversableAgent") -> None:
"""Register a tool to be both proposed and executed by an agent.
Args:
agent (ConversableAgent): The agent to which the tool will be registered.
"""