@@ -26,6 +26,12 @@ Installation Steps
2626
2727 pip install django-email-learning
2828
29+ If you want to use AI editing tools, install with the AI optional extra:
30+
31+ .. code-block :: bash
32+
33+ pip install ' django-email-learning[ai]'
34+
2935 2. **Add to INSTALLED_APPS **
3036
3137 Add 'django_email_learning' to your INSTALLED_APPS in settings.py:
@@ -181,6 +187,50 @@ Optional configuration for branding assets in the platform header.
181187 },
182188 }
183189
190+ **AI **
191+
192+ Optional configuration for AI-powered text editing features.
193+
194+ - Configure this only if you have an OpenAI account and want to use AI edit tools.
195+ - If you do not use AI features, you can omit ``AI `` entirely.
196+ - Install AI dependencies with ``pip install 'django-email-learning[ai]' ``.
197+ - Add ``'django_email_learning.ai' `` to ``INSTALLED_APPS `` when using AI tools.
198+
199+ .. code-block :: python
200+
201+ INSTALLED_APPS = [
202+ # ... your other apps
203+ ' django_email_learning' ,
204+ ' django_email_learning.ai' ,
205+ # ... more apps
206+ ]
207+
208+ Available keys:
209+
210+ - ``OPENAI_API_KEY ``: OpenAI API key used for AI requests.
211+ - ``TEXT_EDITING_MODEL ``: OpenAI model name used by text editing.
212+
213+ Currently supported built-in models are:
214+
215+ - ``gpt-4o-mini ``
216+ - ``gpt-5-nano ``
217+ - ``gpt-5-mini ``
218+
219+ .. code-block :: python
220+
221+ from django_email_learning.ai.language_models import LanguageModel
222+
223+ DJANGO_EMAIL_LEARNING = {
224+ ' SITE_BASE_URL' : ' https://yourdomain.com' ,
225+ ' ENCRYPTION_SECRET_KEY' : ' your-very-long-random-string' ,
226+ ' AI' : {
227+ ' OPENAI_API_KEY' : os.environ.get(' OPENAI_API_KEY' ),
228+ ' TEXT_EDITING_MODEL' : LanguageModel.GPT_4O_MINI .model_name,
229+ },
230+ }
231+
232+ See `AI Configuration <technical/ai-configuration.html >`_ for full details.
233+
184234Email Backend Configuration
185235---------------------------
186236
0 commit comments