Skip to main content

llama-index tools slack integration

Project description

Slack Tool

This tool fetches the text from a list of Slack channels. You will need to initialize the loader with your Slack API Token or have the SLACK_BOT_TOKEN environment variable set.

Usage

from llama_index.tools.slack import SlackToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = SlackToolSpec(slack_token="token")

agent = FunctionAgent(
    tools=tool_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(
    await agent.run(
        "What is the most recent message in the announcements channel?"
    )
)

load_data: Loads messages from a list of channels send_message: Sends a message to a channel fetch_channel: Fetches the list of channels

This loader is designed to be used as a way to load data as a Tool in a Agent.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llama_index_tools_slack-0.4.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llama_index_tools_slack-0.4.1-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file llama_index_tools_slack-0.4.1.tar.gz.

File metadata

File hashes

Hashes for llama_index_tools_slack-0.4.1.tar.gz
Algorithm Hash digest
SHA256 148d6af20c9e7d7750c70b9c47f1eeb9f79d2d5189bd6350021429ad66804919
MD5 c6cff97e288a55ebb330409bb49c1fd5
BLAKE2b-256 d40679248f8d5071c0e99797c45ec65d9bc6e3fa54932442cfb2a936fad737aa

See more details on using hashes here.

File details

Details for the file llama_index_tools_slack-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for llama_index_tools_slack-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 272a78c2f5d7bee5de499f7a45515926f44746fe99459db1bc9089999fc4e5f5
MD5 5673374b271c228ead8e499b62428de7
BLAKE2b-256 de15e13b732b2933f60801038ff7ff8ccf70629bd79677161a89055906f61699

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page