Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion libs/community/langchain_community/tools/slack/get_channel.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
import json
import logging
from typing import Any, List, Optional

from pydantic import BaseModel
from typing import Any, List, Optional, Type

from langchain_core.callbacks import CallbackManagerForToolRun

from langchain_community.tools.slack.base import SlackBaseTool

class SlackGetChannelSchema(BaseModel):
"""Placeholder input schema for SlackGetChannel.

This class is intentionally minimal and serves as a placeholder for the
tool's argument schema. It exists so the tool machinery can introspect
the expected argument type. Add fields here later if the tool requires
structured inputs such as pagination cursors or filters.

Note:
No arguments are currently defined for this schema. If/when fields
are added, document them in an ``Args`` section following Google
style docstrings.
"""
pass


class SlackGetChannel(SlackBaseTool):
"""Tool that gets Slack channel information."""
Expand All @@ -14,6 +31,7 @@ class SlackGetChannel(SlackBaseTool):
description: str = (
"Use this tool to get channelid-name dict. There is no input to this tool"
)
args_schema: Type[SlackGetChannelSchema] = SlackGetChannelSchema

def _get_all_channels_by_type(self, types: str = "public_channel") -> List[dict]:
"""
Expand Down