|
1 | | -# DecryptGPT |
| 1 | +# EdgarGPT |
2 | 2 |
|
3 | | -DecryptGPT is an advanced Discord bot developed by Decrypt, utilizing the `discord.js` library, along with OpenAI's powerful language models GPT-4o and the image-processing capabilities of GPT-4 Vision and GPT-Image-1, complemented by OpenAI's Whisper model for transcribing voice messages. This bot offers a comprehensive AI experience within Discord channels, capable of engaging in text conversations, responding to voice inputs, analyzing visual content, processing documents, generating and editing images, and seamlessly switching between different GPT models using slash commands. Whether for advanced medical revisions, casual interactions, or exploring the capabilities of AI, DecryptGPT is designed to enrich the Discord chat experience. |
| 3 | +EdgarGPT is an advanced Discord bot developed by Decrypt, utilizing the `discord.js` library along with OpenAI's latest models including GPT-4o, GPT-4.1, and o3. The bot features image generation and editing capabilities using GPT-Image-1, voice message transcription with Whisper, and comprehensive document processing. Designed specifically for medical students and professionals, Edgar provides academic assistance and AI-powered conversations in French, making it ideal for advanced medical revisions and study sessions. |
4 | 4 |
|
5 | 5 | ## Features |
6 | 6 |
|
7 | | -- **Multiple GPT Modes**: Choose between GPT-4o or GPT-4 Vision for diverse interactions. |
8 | | -- **Voice Message Understanding**: DecryptGPT can transcribe voice messages and respond to them, making interaction more seamless. |
9 | | -- **Image Recognition**: With GPT-4 Vision, the bot can interpret images sent in the chat, adding a new dimension to AI conversations. |
10 | | -- **Image Generation and Editing**: Using GPT-Image-1, the bot can: |
11 | | - - **Generate** completely new images based on text prompts. |
12 | | - - **Edit** existing uploaded images according to a provided text instruction. |
13 | | -- **Document Processing**: The bot can analyze and extract text from various file formats: |
| 7 | +- **Multiple AI Models**: Switch between GPT-4o (Edgar), GPT-4.1 (Edgar +), and o3 (Edgar ++) for different conversation experiences |
| 8 | +- **Text and Voice Modes**: Toggle between text and voice interaction modes |
| 9 | +- **Voice Message Transcription**: Automatically transcribes voice messages using OpenAI's Whisper model |
| 10 | +- **Image Analysis**: Interprets and analyzes medical images and other visual content |
| 11 | +- **Image Generation**: Create new images from text descriptions using GPT-Image-1 |
| 12 | +- **Image Editing**: Modify existing images based on text instructions |
| 13 | +- **Document Processing**: Extract and analyze content from various file formats: |
14 | 14 | - PDF documents |
15 | 15 | - Text files (.txt) |
16 | | - - CSV files (with data analysis capabilities) |
| 16 | + - CSV files with data analysis |
17 | 17 | - Excel files (.xls, .xlsx) including multiple sheets |
18 | | -- **Customizable Configuration**: Tailor the bot's behavior through the `config.js` file, including setting the AI name, choosing the default GPT model, and more. |
19 | | -- **Detailed Logging**: Enable detailed logging for debugging and monitoring interactions. |
| 18 | +- **Medical Focus**: Specialized prompts and responses tailored for medical education and revision |
| 19 | +- **French Language Support**: Primary language support for French medical terminology and conversations |
| 20 | +- **Custom Emotes**: Uses Discord emotes for enhanced interaction feedback |
| 21 | +- **Graceful Shutdown**: Proper cleanup and shutdown handling |
20 | 22 |
|
21 | 23 | ## Slash Commands |
22 | 24 |
|
23 | | -DecryptGPT supports several slash commands to interact with the AI: |
| 25 | +EdgarGPT supports the following slash commands: |
24 | 26 |
|
25 | | -- `/chat` — Start a conversation with the selected GPT model. |
26 | | -- `/generate` — Generate a new image from a text prompt using **GPT-Image-1**. |
27 | | -- `/edit` — Upload an image and provide a prompt to modify it using **GPT-Image-1**. |
| 27 | +- `/gpt-model` — Switch between AI models (GPT-4o, GPT-4.1, o3) |
| 28 | +- `/gpt-mode` — Toggle between text and voice interaction modes |
| 29 | +- `/image-gpt` — Generate new images from text descriptions using GPT-Image-1 |
| 30 | +- `/image-edit` — Upload an image and modify it with text instructions |
28 | 31 |
|
29 | | -Console logs are included at every major step to ensure visibility on operations (e.g., request sent, response received, errors). |
| 32 | +All commands include comprehensive logging for monitoring and debugging purposes. |
30 | 33 |
|
31 | 34 | ## Configuration |
32 | 35 |
|
33 | | -Before running DecryptGPT, some configurations are required: |
| 36 | +Before running EdgarGPT, configure the following: |
34 | 37 |
|
35 | | -- **.env File**: Create a `.env` file in the root directory with the following contents: |
| 38 | +### Environment Variables |
36 | 39 |
|
37 | | - ```bash |
38 | | - API_KEY=your_openai_api_key |
39 | | - TOKEN=your_discord_bot_token |
40 | | - CLIENT_ID=your_discord_app_client_id |
| 40 | +Create a `.env` file in the root directory: |
41 | 41 |
|
42 | | -Replace your_openai_api_key and your_discord_bot_token with your respective OpenAI API key and Discord bot token. |
43 | | - • channels.mjs: Edit channels.mjs to include the IDs of the Discord channels where the bot is allowed to operate. Channel IDs can be obtained by enabling Developer Mode in Discord and right-clicking on the channel to copy its ID. |
44 | | - • config.js: Customize the bot’s settings in config.js. |
| 42 | +```bash |
| 43 | +API_KEY=your_openai_api_key |
| 44 | +TOKEN=your_discord_bot_token |
| 45 | +CLIENT_ID=your_discord_app_client_id |
| 46 | +``` |
45 | 47 |
|
46 | | -Installation |
| 48 | +Replace the placeholder values with your actual OpenAI API key and Discord bot credentials. |
47 | 49 |
|
48 | | - 1. Clone the repository: |
| 50 | +### Channel Configuration |
49 | 51 |
|
50 | | -git clone <https://github.com/decryptu/DecryptGPT.git> |
51 | | - |
52 | | - 2. Navigate to the project directory: |
| 52 | +- **channels.mjs**: Add Discord channel IDs where the bot should operate. Enable Developer Mode in Discord and right-click channels to copy their IDs. |
53 | 53 |
|
54 | | -cd DecryptGPT |
| 54 | +### Bot Settings |
55 | 55 |
|
56 | | - 3. Install dependencies: |
| 56 | +- **config.js**: Customize bot behavior including: |
| 57 | + - AI personality and prompts (currently optimized for French medical education) |
| 58 | + - Default model and mode settings |
| 59 | + - Token limits and retry configurations |
| 60 | + - Image generation settings |
57 | 61 |
|
58 | | -npm install |
| 62 | +## Installation |
59 | 63 |
|
60 | | - 4. Install additional packages for document processing: |
| 64 | +1. Clone the repository: |
61 | 65 |
|
62 | | -npm install pdf.js-extract xlsx |
| 66 | +```bash |
| 67 | +git clone https://github.com/Decryptu/EdgarGPT.git |
| 68 | +``` |
63 | 69 |
|
64 | | -Running the Bot |
65 | | - • To run the bot: |
| 70 | +2. Navigate to the project directory: |
66 | 71 |
|
67 | | -npm start |
| 72 | +```bash |
| 73 | +cd EdgarGPT |
| 74 | +``` |
68 | 75 |
|
69 | | - • For development with hot reloads: |
| 76 | +3. Install dependencies: |
70 | 77 |
|
71 | | -npm run dev |
| 78 | +```bash |
| 79 | +bun install |
| 80 | +``` |
72 | 81 |
|
73 | | -Example Usage |
74 | | - • Generate an image: |
| 82 | +## Running the Bot |
75 | 83 |
|
76 | | -/image prompt: "A futuristic city floating above the clouds" |
| 84 | +- **Production**: `bun start` |
| 85 | +- **Development** (with auto-reload): `bun run dev` |
77 | 86 |
|
78 | | -The bot will reply with an original AI-generated image. |
| 87 | +## Usage Examples |
79 | 88 |
|
80 | | - • Edit an uploaded image: |
| 89 | +### Generate an image |
81 | 90 |
|
82 | | -/image-edit image: [Upload your image] prompt: "Make the sky sunset-themed with flying cars" |
| 91 | +``` |
| 92 | +/image-gpt description: "A detailed anatomical diagram of the human heart" |
| 93 | +``` |
83 | 94 |
|
84 | | -The bot will modify the uploaded image according to the prompt. |
| 95 | +### Edit an uploaded image |
85 | 96 |
|
86 | | -Contributing |
| 97 | +``` |
| 98 | +/image-edit image: [Upload your image] description: "Add labels to the anatomical structures" |
| 99 | +``` |
87 | 100 |
|
88 | | -Contributions to DecryptGPT are welcome! Feel free to submit pull requests, create issues, or suggest new features. |
| 101 | +### Switch AI models |
89 | 102 |
|
90 | | -License |
| 103 | +``` |
| 104 | +/gpt-model model: o3 |
| 105 | +``` |
| 106 | + |
| 107 | +### Change interaction mode |
| 108 | + |
| 109 | +``` |
| 110 | +/gpt-mode mode: voice |
| 111 | +``` |
| 112 | + |
| 113 | +## Development |
| 114 | + |
| 115 | +The bot is built with modern JavaScript (ES modules) and includes: |
| 116 | + |
| 117 | +- **Discord.js v14**: Latest Discord API support |
| 118 | +- **OpenAI API v4**: Access to latest AI models |
| 119 | +- **Modular Architecture**: Organized command and event handling |
| 120 | +- **Error Handling**: Comprehensive error logging and recovery |
| 121 | +- **Document Processing**: Support for multiple file formats |
| 122 | +- **Image Processing**: Generation and editing capabilities |
| 123 | + |
| 124 | +## Node.js Requirements |
| 125 | + |
| 126 | +- Node.js >= 18.0.0 |
| 127 | + |
| 128 | +## Contributing |
| 129 | + |
| 130 | +Contributions to EdgarGPT are welcome! Feel free to submit pull requests, create issues, or suggest new features. |
| 131 | + |
| 132 | +## License |
91 | 133 |
|
92 | 134 | This project is licensed under the ISC License. |
93 | 135 |
|
94 | | -⸻ |
| 136 | +--- |
95 | 137 |
|
96 | 138 | Developed with ❤️ by Decrypt |
0 commit comments