This repository contains the implementation of a Sequential Thinking Server for AI-powered article illustration. The server analyzes article content using a step-by-step approach to extract key information and generate appropriate visual suggestions.
- Content Analysis: Breaks down articles into meaningful segments
- Keyword Extraction: Identifies key themes and topics
- Emotion Analysis: Determines the emotional tone of content
- Visualization Suggestions: Recommends appropriate visualization types
- Image Prompt Generation: Creates prompts for AI image generation
The system is built using:
- FastAPI for the web server
- OpenAI's GPT-4 for content analysis
- Pydantic for data validation
- pytest for testing
- Clone the repository:
git clone https://github.com/your-username/sequential-thinking-paper.git
cd sequential-thinking-paper- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env with your OpenAI API key- Start the server:
python run_servers.py- Send a POST request to analyze content:
curl -X POST "http://localhost:8000/analyze" \
-H "Content-Type: application/json" \
-d '{"content": "Your article text here", "max_segments": 1, "analysis_type": "article"}'Run tests with:
python -m pytest tests/ -v- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
If you use this work in your research, please cite:
@article{sequential-thinking,
title={Sequential Thinking: A Step-by-Step Approach to AI Content Analysis},
author={Your Name},
year={2025},
journal={Preprint}
}