mirror of
https://github.com/hwchase17/langchain.git
synced 2025-05-08 00:28:47 +00:00
Co-authored-by: Bagatur <baskaryan@gmail.com> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
21 lines
469 B
Python
21 lines
469 B
Python
"""Base class for Slack tools."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
from langchain_core.tools import BaseTool
|
|
from pydantic import Field
|
|
|
|
from langchain_community.tools.slack.utils import login
|
|
|
|
if TYPE_CHECKING:
|
|
from slack_sdk import WebClient
|
|
|
|
|
|
class SlackBaseTool(BaseTool): # type: ignore[override]
|
|
"""Base class for Slack tools."""
|
|
|
|
client: WebClient = Field(default_factory=login)
|
|
"""The WebClient object."""
|