AI Content Summarization
The AI Content Summarization feature allows you to quickly grasp the key points of any chapter or topic using AI-generated summaries.
How it Works
On every content page, you will see a toggle at the top with two options:
- Original: Displays the full, detailed content of the page (default view).
- Summary: Generates and displays a concise AI-powered summary of the page's content.
Using the Toggle
- Click Summary to generate a summary. The first time you do this for a page, it may take a few seconds to communicate with the AI service.
- Click Original to return to the full text.
- Your preference is saved! If you switch to "Summary" mode, the next page you visit will also try to show you the summary first.
Configuration
This feature requires an OpenAI API key to function.
Setting up the API Key
- Get an API key from OpenAI Platform.
- Create a
.envfile in the root of the project (if it doesn't exist). - Add your API key:
REACT_APP_OPENAI_API_KEY=sk-your-actual-api-key-here
warning
Never commit your .env file to version control. Ensure it is listed in your .gitignore.
Troubleshooting
- "OpenAI API key not configured": Make sure you have created the
.envfile and restarted the development server. - "Rate limit exceeded": You may have run out of credits on your OpenAI account or are making too many requests too quickly.
- Summary is empty or poor quality: The AI might struggle with very short pages or pages that contain mostly images/code. Try viewing the Original content.