█

AI/TLDR

मुझे पिलाएं कॉफ़ी
मुझे एक कॉफ़ी पिलाएँ

GPTDiscord

Discord के लिए self-hosted OpenAI बॉट: ChatGPT जैसे थ्रेड, इमेज समझना, DALL-E, कोड एक्ज़िक्यूशन, दस्तावेज़ Q&A और AI मॉडरेशन, सब slash commands के ज़रिए

Assistants & Chatbotsओपन सोर्स
ताज़ा
v12.4.0
अपडेट किया गया
6 फ़र॰ 2026
भाषा
Python
लाइसेंस
MIT
$git clone https://github.com/Kav-K/GPTDiscord.git

नया क्या है

v12.4.06 फ़र॰ 2026

Migrated the bot to OpenAI's Chat Completions API and updated dependencies.

संक्षेप में

GPTDiscord क्या है?

GPTDiscord Discord के लिए self-hosted OpenAI बॉट: ChatGPT जैसे थ्रेड, इमेज समझना, DALL-E, कोड एक्ज़िक्यूशन, दस्तावेज़ Q&A और AI मॉडरेशन, सब slash commands के ज़रिए. यह Agents & Automation टूल्स की Assistants & Chatbots श्रेणी में आता है; ओपन सोर्स है, Python में लिखा गया है और MIT लाइसेंस के तहत है।

अपडेट किया गया Markdown वर्शन ↗

सारांश

GPTDiscord एक ओपन सोर्स Python बॉट है जो OpenAI के मॉडल को Discord सर्वर के अंदर लाता है। इसे आप अपनी OpenAI API key और Discord bot token के साथ खुद चलाते हैं, और सदस्य ग्रुप्ड slash commands के ज़रिए इस तक पहुँचते हैं: /gpt converse किसी थ्रेड या पूरे चैनल में ChatGPT जैसी बातचीत शुरू करता है, /gpt ask एक बार के prompt का जवाब देता है, और चैट में बस bot को tag करके भी जवाब पाया जा सकता है। बातचीत में ऐसी इमेज शामिल हो सकती हैं जिन्हें bot देखता है, और वह उसी exchange में DALL-E से ड्रॉइंग भी बना सकता है।

GPTDiscord bot in a Discord conversation describing a photo of the Toronto skyline a user posted
Multi-modal conversation: the bot describes an image sent in chatGPTDiscord README ↗

चैट के अलावा, बॉट में कई विशेष मोड भी हैं। /code chat एक code-interpreter बातचीत है जो एक अलग-थलग (isolated) execution environment में Python चलाती है (प्रोजेक्ट code execution के लिए E2B का श्रेय देता है), और इसमें packages इंस्टॉल करने तथा इंटरनेट तक पहुँचने की सुविधा है। /internet chat और /internet search मॉडल को Google, Wolfram Alpha और एक web crawler से जोड़ते हैं। /index commands अपलोड की गई फ़ाइलों, links या Discord चैनल हिस्ट्री से custom indexes बनाते हैं, ताकि बॉट आपके अपने दस्तावेज़ों से जवाब दे सके; प्रोजेक्ट अपना vector storage Pinecone से Qdrant में ले जा रहा है।

Diagram of GPTDiscord's main modes: /gpt converse, /code chat, /internet chat and /index chat with their capabilities
Overview of the bot's main chat modesGPTDiscord README ↗

सर्वर मैनेजमेंट की सुविधाएँ AI वाली सुविधाओं के साथ मौजूद हैं: alert चैनल के साथ स्वचालित AI moderation, DeepL translation, GPT, DALL-E और admin commands के लिए role-based permissions, हर user और हर चैनल के लिए system instructions, वैकल्पिक per-user API keys, token-usage tracking, और एक low-usage mode जो सस्ते मॉडल पर स्विच कर देता है। सब कुछ एक ही .env फ़ाइल से configure होता है, और बॉट को सीधे Python से, Docker में, या Docker Compose से चलाया जा सकता है।

यह क्या करता है

  • /gpt converse के साथ थ्रेड या चैनल में ChatGPT जैसी बातचीत, जिसमें इमेज समझना और बातचीत के बीच DALL-E से ड्रॉइंग बनाना शामिल है
  • कोड इंटरप्रेटर मोड (/code chat) जो एक अलग-थलग environment में Python चलाता है और packages इंस्टॉल कर सकता है
  • Google, Wolfram Alpha और link crawler पर आधारित, इंटरनेट से जुड़ी चैट और सर्च
  • अपलोड की गई फ़ाइलों, links या Discord चैनल हिस्ट्री से दस्तावेज़ Q&A के लिए custom indexes (/index add, /index chat, /index discord_backup)
  • DALL-E इमेज जनरेशन के साथ prompt optimizer, और DeepL translation
  • AI moderation, role-based command permissions, हर user और हर चैनल के लिए instructions, और वैकल्पिक user-supplied API keys
  • Discord में operational controls: temperature और top_p जैसी model settings, usage tracking, low-usage mode और raw responses के लिए एक debug चैनल
Internet-connected chat in Discord answering questions using Google Search, Wolfram Alpha and a web crawler
Internet-connected chat
Code interpreter conversation in Discord solving a linear programming problem with Python and showing the executed code
Code interpreter chat
Data-connected conversation in Discord where the bot summarises an uploaded PDF invoice and answers a question about it
Document Q&A with custom indexes

शुरू करें

आपको एक OpenAI API key और एक Discord bot token चाहिए (Discord Developer Portal में एक application बनाएँ, उसके intents enable करें और bot तथा applications.commands scopes के साथ उसे invite करें)। प्रोजेक्ट Python 3.9 की सिफ़ारिश करता है।

प्रोजेक्ट clone करें

bashbash
git clone https://github.com/Kav-K/GPTDiscord.git
cd GPTDiscord/

Dependencies इंस्टॉल करें

torch और whisper packages OCR/दस्तावेज़ वाली सुविधाओं और .mp3 व .mp4 फ़ाइलों की इंडेक्सिंग के लिए audio extraction को चलाते हैं।

bashbash
python3.9 -m venv venv
source venv/bin/activate
python3.9 -m pip install torch==1.13.1+cpu torchvision==0.14.1+cpu -f https://download.pytorch.org/whl/torch_stable.html
python3.9 -m pip install git+https://github.com/openai/whisper.git
python3.9 -m pip install -r requirements.txt
python3.9 -m pip install .

.env फ़ाइल configure करें

सैंपल फ़ाइल copy करें और कम से कम OPENAI_TOKEN, DISCORD_TOKEN, DEBUG_GUILD, DEBUG_CHANNEL और ALLOWED_GUILDS भरें। Guild और चैनल IDs Discord में किसी सर्वर या चैनल पर right-click करके Copy ID चुनने से मिलते हैं। ADMIN_ROLES, DALLE_ROLES और GPT_ROLES जैसी role lists तय करती हैं कि कौन-से commands का इस्तेमाल कौन कर सकता है।

bashbash
cp sample.env .env
nano .env

बॉट चलाएँ

bashbash
python3.9 gpt3discord.py

या Docker में चलाएँ

.env फ़ाइल को /opt/gpt3discord/etc/environment पर mount करें और उसमें DATA_DIR=/data और SHARE_DIR=/data/share जोड़ें। एक docker-compose.yml भी दी गई है: .env भरें और docker-compose up -d चलाएँ।

bashbash
docker run -d --name gpt3discord -v env_file:/opt/gpt3discord/etc/environment -v /containers/gpt3discord:/data -v /containers/gpt3discord/share:/data/share ghcr.io/kav-k/gptdiscord:main-full

कमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।

कब इस्तेमाल करें

  • एक Discord community को साझा ChatGPT जैसा असिस्टेंट दें, जो आपकी अपनी OpenAI key पर चले, और roles तय करें कि उसका इस्तेमाल कौन कर सकता है
  • सदस्यों को अपलोड किए गए दस्तावेज़ों, links या सर्वर की अपनी चैनल हिस्ट्री पर सवाल पूछने दें
  • Discord छोड़े बिना Python विश्लेषण या इंटरनेट से जुड़ी रिसर्च चलाएँ
  • व्यस्त सर्वर में स्वचालित AI moderation और translation जोड़ें

How GPTDiscord compares

GPTDiscord alongside other open-source assistants & chatbots tools AI/TLDR tracks, ranked by GitHub stars.

टूलस्टारयह क्या करता है
OpenClaw★ 396kआपके मौजूदा चैट ऐप्स पर बात करने वाला, अपनी मशीन पर self-host किया गया पर्सनल AI असिस्टेंट
Hermes Agent★ 268kस्वयं-सुधारने वाला AI एजेंट, जो अनुभव से सीखता है और कहीं भी चलता है
Odysseus★ 96.1kएक self-hosted AI workspace: चैट, agents, रिसर्च, डॉक्यूमेंट्स, ईमेल, नोट्स और कैलेंडर, सब एक ही stack में
CowAgent★ 48.2kएक सेल्फ-होस्टेड असिस्टेंट जो टास्क की योजना बनाता है, टूल चलाता है और वहीं जवाब देता है जहाँ आपकी टीम पहले से चैट करती है
AstrBot★ 47.9kआपके मैसेजिंग ऐप्स के लिए ऑल-इन-वन एजेंट चैटबॉट प्लेटफ़ॉर्म
OpenHuman★ 43kलोकल मशीन पर अपनी मेमोरी रखने वाला डेस्कटॉप पर्सनल AI
MindsHub★ 39.9kएजेंट वर्कस्पेस, जिसमें बदले जा सकने वाले ओपन harness और अपनी पसंद का मॉडल
GPTDiscord★ 1.9kDiscord के लिए self-hosted OpenAI बॉट: ChatGPT जैसे थ्रेड, इमेज समझना, DALL-E, कोड एक्ज़िक्यूशन, दस्तावेज़ Q&A और AI मॉडरेशन, सब slash commands के ज़रिए