Discord Toolkit #26959
chunkanglu
started this conversation in
Ideas
Discord Toolkit
#26959
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Checked
Feature request
We plan to introduce a Discord integration toolkit similar to the existing Slack toolkit. This would allow for more agentic behavior from language models in interacting with a Discord server and users through Discord bots. We aim to have the tentative feature set of the following as a start:
Motivation
Currently, the functionality related to Discord is limited only to importing data via the DiscordChatLoader which not only requires a lengthy retrieval process, but also is not able to interface with recent information as a result. Yet we see great potential in using language models and agents as part of server moderation among other automations to extend existing server capabilities. For example, being able to retrieve the last 10 messages from a user in a text channel and determine if they should be banned for say inappropriate language. We hope to be able to provide the fundamental tools for people to build these more sophisticated processes.
A previous issue #11584 was created last year with similar intentions but was closed without further development, so clearly there is some interest in this sort of functionality. There also exists a Discord tool in LangchainJS so it seems fitting for one to also be here for consistency.
Proposal (If applicable)
We plan to structure our implementation to be similar to other toolkits, in particular the Slack Toolkit and the existing Discord Toolkit in LangchainJS for consistency. To interface with Discord, we plan to make use of the MIT-licensed discord.py library with all functionality implemented through Discord bots.
Sample Usage
Sample Output
Main File Changes
discord.py
base.py
DiscordTool
class that extendsBaseTool
containing aDiscordAPIWrapper
.get_messages.py
,get_user.py
,get_members.py
, …DiscordTool
class with the specific functionality._run
method that is used when an agent uses the tool.toolkit.py
BaseToolkit
class and lists out the available tools implemented in the get_tools method.discord.ipynb
(the various)
__init__.py
test_signatures.py
, (both)test_imports.py
test_discord.py
Timeline
We (a group of 4) will be working on this and aim to submit a PR for early November.
Beta Was this translation helpful? Give feedback.
All reactions