Source code for langchain_community.agent_toolkits.slack.toolkit

from __future__ import annotations

from typing import TYPE_CHECKING, List

from langchain_core.pydantic_v1 import Field
from import BaseToolkit

from import BaseTool
from import SlackGetChannel
from import SlackGetMessage
from import SlackScheduleMessage
from import SlackSendMessage
from import login

    from slack_sdk import WebClient

[docs]class SlackToolkit(BaseToolkit): """Toolkit for interacting with Slack.""" client: WebClient = Field(default_factory=login) class Config: """Pydantic config.""" arbitrary_types_allowed = True
[docs] def get_tools(self) -> List[BaseTool]: """Get the tools in the toolkit.""" return [ SlackGetChannel(), SlackGetMessage(), SlackScheduleMessage(), SlackSendMessage(), ]