|
1 | 1 | # EdgarGPT |
2 | 2 |
|
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. |
| 3 | +EdgarGPT is a Discord bot powered by OpenAI's latest GPT-5 model and Responses API. Built for medical students and professionals, it provides AI-powered assistance in French with advanced document processing, image analysis, and web search capabilities. |
4 | 4 |
|
5 | 5 | ## Features |
6 | 6 |
|
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 | | - - PDF documents |
15 | | - - Text files (.txt) |
16 | | - - CSV files with data analysis |
17 | | - - Excel files (.xls, .xlsx) including multiple sheets |
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 |
| 7 | +- **Dual AI Modes**: Edgar (GPT-5) and Edgar++ (GPT-5 with reasoning) |
| 8 | +- **Voice Transcription**: Processes Discord voice messages with Whisper |
| 9 | +- **Image Analysis**: Medical image interpretation without restrictions |
| 10 | +- **Image Generation & Editing**: Create and modify images with GPT-Image-1 |
| 11 | +- **Document Processing**: Direct file analysis through Responses API (PDF, TXT, CSV, Excel) |
| 12 | +- **Web Search**: Real-time information retrieval when needed |
| 13 | +- **Medical Focus**: Optimized for medical education in French |
| 14 | +- **Smart Context**: Maintains conversation history for coherent discussions |
22 | 15 |
|
23 | | -## Slash Commands |
| 16 | +## Commands |
24 | 17 |
|
25 | | -EdgarGPT supports the following slash commands: |
| 18 | +- `/model` — Switch between Edgar and Edgar++ modes |
| 19 | +- `/image` — Generate images from text descriptions |
| 20 | +- `/image-edit` — Modify uploaded images with text prompts |
26 | 21 |
|
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 |
| 22 | +## Setup |
31 | 23 |
|
32 | | -All commands include comprehensive logging for monitoring and debugging purposes. |
| 24 | +### Prerequisites |
33 | 25 |
|
34 | | -## Configuration |
35 | | - |
36 | | -Before running EdgarGPT, configure the following: |
37 | | - |
38 | | -### Environment Variables |
39 | | - |
40 | | -Create a `.env` file in the root directory: |
41 | | - |
42 | | -```bash |
43 | | -API_KEY=your_openai_api_key |
44 | | -TOKEN=your_discord_bot_token |
45 | | -CLIENT_ID=your_discord_app_client_id |
46 | | -``` |
47 | | - |
48 | | -Replace the placeholder values with your actual OpenAI API key and Discord bot credentials. |
49 | | - |
50 | | -### Channel Configuration |
51 | | - |
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 | | - |
54 | | -### Bot Settings |
55 | | - |
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 |
61 | | - |
62 | | -## Installation |
| 26 | +- Node.js >= 18.0.0 |
| 27 | +- OpenAI API key |
| 28 | +- Discord bot token |
63 | 29 |
|
64 | | -1. Clone the repository: |
| 30 | +### Installation |
65 | 31 |
|
66 | 32 | ```bash |
67 | 33 | git clone https://github.com/Decryptu/EdgarGPT.git |
68 | | -``` |
69 | | - |
70 | | -2. Navigate to the project directory: |
71 | | - |
72 | | -```bash |
73 | 34 | cd EdgarGPT |
74 | | -``` |
75 | | - |
76 | | -3. Install dependencies: |
77 | | - |
78 | | -```bash |
79 | 35 | bun install |
80 | 36 | ``` |
81 | 37 |
|
82 | | -## Running the Bot |
83 | | - |
84 | | -- **Production**: `bun start` |
85 | | -- **Development** (with auto-reload): `bun run dev` |
| 38 | +### Configuration |
86 | 39 |
|
87 | | -## Usage Examples |
| 40 | +Create `.env` file: |
88 | 41 |
|
89 | | -### Generate an image |
90 | | - |
91 | | -``` |
92 | | -/image-gpt description: "A detailed anatomical diagram of the human heart" |
| 42 | +```env |
| 43 | +API_KEY=your_openai_api_key |
| 44 | +TOKEN=your_discord_bot_token |
| 45 | +CLIENT_ID=your_discord_app_client_id |
93 | 46 | ``` |
94 | 47 |
|
95 | | -### Edit an uploaded image |
| 48 | +Add allowed channel IDs in `channels.mjs`. |
96 | 49 |
|
97 | | -``` |
98 | | -/image-edit image: [Upload your image] description: "Add labels to the anatomical structures" |
99 | | -``` |
| 50 | +## Usage |
100 | 51 |
|
101 | | -### Switch AI models |
| 52 | +**Production**: `bun start` |
| 53 | +**Development**: `bun run dev` |
102 | 54 |
|
103 | | -``` |
104 | | -/gpt-model model: o3 |
105 | | -``` |
| 55 | +### Examples |
106 | 56 |
|
107 | | -### Change interaction mode |
| 57 | +Generate an image: |
108 | 58 |
|
109 | | -``` |
110 | | -/gpt-mode mode: voice |
| 59 | +```txt |
| 60 | +/image description: "anatomical diagram of the human heart" |
111 | 61 | ``` |
112 | 62 |
|
113 | | -## Development |
| 63 | +Switch to reasoning mode: |
114 | 64 |
|
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 |
| 65 | +```txt |
| 66 | +/model model: Edgar++ |
| 67 | +``` |
127 | 68 |
|
128 | | -## Contributing |
| 69 | +## Tech Stack |
129 | 70 |
|
130 | | -Contributions to EdgarGPT are welcome! Feel free to submit pull requests, create issues, or suggest new features. |
| 71 | +- **Discord.js v14** - Discord API integration |
| 72 | +- **OpenAI Responses API** - Unified AI interface |
| 73 | +- **ES Modules** - Modern JavaScript architecture |
131 | 74 |
|
132 | 75 | ## License |
133 | 76 |
|
134 | | -This project is licensed under the ISC License. |
| 77 | +ISC License |
135 | 78 |
|
136 | 79 | --- |
137 | 80 |
|
138 | | -Developed with ❤️ by Decrypt |
| 81 | +Built by Decrypt |
0 commit comments