MemesPy
Description
π DSPy Meme Generator: AI-powered meme creation using DSPy and FastAPI. Generate hilarious, relevant memes with intelligent text and image generation. Ready for GPT-4o's upcoming image capabilities! π
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
MemesPy
FastAPI service that generates memes using DSPy for text and OpenAI for images.
How It Works
- User submits a topic and optional format via the REST API.
- DSPy (ChainOfThought) generates meme text and an image prompt.
- Image is generated via gpt-image-1 (saved locally) or DALL-E 3 (URL returned).
- Meme is stored in SQLite with metadata (generation time, cost, quality scores).
Tech Stack
| Component | Technology |
|---|---|
| API | FastAPI, served by Uvicorn |
| Text generation | DSPy with OpenAI models |
| Image generation | gpt-image-1 (primary), DALL-E 3 (fallback) |
| Database | SQLAlchemy + SQLite |
| Cache | Redis (optional) |
| Monitoring | Grafana dashboards, Prometheus |
API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| POST | /api/v1/memes/ |
Generate a meme |
| GET | /api/v1/memes/ |
List memes |
| GET | /api/v1/memes/{id} |
Get a specific meme |
| GET | /api/v1/analytics/stats/{period} |
Generation statistics |
| GET | /api/v1/analytics/trending |
Trending memes |
| POST | /api/v1/analytics/search |
Search by metadata |
Requirements
- Python 3.10+
- OpenAI API key
Setup
git clone https://github.com/jmanhype/MemesPy.git
cd MemesPy
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env # add OPENAI_API_KEY
python scripts/init_db.py
python -m uvicorn src.dspy_meme_gen.api.main:app --port 8081
API docs at `localhost:8081/docs`.
Tests
pytest
Test suite includes unit tests for agents (factuality, image renderer, prompt generator, router, scorer), integration tests, and actor supervision tests.
Status
Working prototype. Meme text generation and image generation function correctly with valid API keys. The analytics and metadata tracking endpoints are built. The repository contains 40+ generated meme PNGs committed to `static/images/memes/` which inflates the repo size. The arti
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
π₯ The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
βAI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.π― εε«δΏ‘ζ―θΏθ½½οΌδ½ η
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI