gpt-discord-bot
by
openai

Description: Example Discord bot written in Python that uses the completions API to have conversations with the `text-davinci-003` model, and the moderations API to filter...

View on GitHub ↗

Summary Information

Updated 38 minutes ago
Added to GitGenius on April 23rd, 2023
Created on December 21st, 2022
Open Issues & Pull Requests: 13 (+0)
Number of forks: 640
Total Stargazers: 1,825 (+0)
Total Subscribers: 33 (+0)

Issue Activity (beta)

Open issues: 8
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 627 days
Stale 30+ days: 8
Stale 90+ days: 8

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

  • bug (30)

Most active issues this week

No issue events were indexed in the last 7 days.

Repository Insights (GitGenius)

Median issue/PR response: 0.0 hours
Mean response time: 162.5 days
90th percentile: 625.4 days
Tracked items: 7

Most active contributors

Detailed Description

The gpt-discord-bot repository is an example Discord bot implementation written in Python that integrates OpenAI's language models with Discord servers. The bot leverages the chat completions API to enable conversational interactions with the gpt-3.5-turbo model and incorporates the moderations API to filter potentially problematic messages before they are processed or displayed.

The primary feature of this bot is the /chat command, which initiates a public thread within Discord where users can have conversations with the AI model. When a user invokes this command, they provide an initial message along with optional parameters to adjust the temperature and max_tokens settings, allowing fine-tuning of the model's response behavior. The bot automatically generates replies to every user message posted within threads created through the /chat command. A key capability is that the entire conversation thread is passed to the model with each request, enabling the bot to maintain context and remember previous messages within that thread. The bot includes safeguards that automatically close threads when either the context limit is reached or a maximum message count is exceeded.

Customization options are built into the bot's design. Users can modify bot instructions by editing the config.yaml file, and the default model can be changed from gpt-3.5-turbo to other available models. Additional configuration allows for moderation message routing to specific channels per server, with adjustable moderation sensitivity settings in the constants.py file. The bot depends on the OpenAI Python Library and discord.py for its core functionality.

According to GitGenius activity tracking, this repository has experienced relatively low issue and pull request engagement, with a median response latency of 0.0 hours across seven tracked items, though the mean latency of 3899.0 hours indicates some responses took significantly longer. Bug reports represent the most active issue category with seven tracked items. The most active contributors tracked by GitGenius include lokashrinav with three events, 9hb with two events, and 88Miss88 with one event. The repository shows overlapping contributors with major projects including microsoft/vscode, microsoft/typescript, and rust-lang/rust, suggesting involvement from developers working across multiple significant codebases.

The repository explicitly states that it is not accepting feature requests, directing users to fork the repository if they wish to implement new features. Only bug fix pull requests are accepted. The maintainers have established dedicated Discord channels for different types of support: a project post channel for bot-specific problems, an API discussions channel for general OpenAI API questions, and the GitHub issues system for template code bugs. Setup requires Python 3.9 or higher and involves configuring environment variables with OpenAI API keys and Discord bot credentials, along with setting appropriate permissions for the bot within Discord servers.

gpt-discord-bot
by
openaiopenai/gpt-discord-bot

Repository Details

Fetching additional details & charts...