Standalone test harness for converting PDFs into iTELL JSON, including the modular mode system used by itell-api.
Use this repo to test prompt and pipeline behavior before wiring changes into the API or CMS. The current modular flow supports:
faithfulsimplifiedcondensedgenerativeinteraction-heavy
generative is intended for course-outline PDFs or PPTX slide decks where the model authors iTELL content from the outline rather than extracting textbook prose verbatim.
- Python 3.8 or higher
- Create and activate a virtual environment.
- Install dependencies:
pip install -r requirements.txt
- Create a
.envfile in the project root and configure one provider:OPENAI_API_KEY=your_openai_api_key_here # OR OPENROUTER_API_KEY=your_openrouter_api_key_here OPENAI_MODEL=gpt-4o-mini OPENROUTER_MODEL=google/gemini-2.5-flash OPENAI_BASE_URL=https://api.openai.com/v1 OPENROUTER_BASE_URL=https://openrouter.ai/api/v1 OPENROUTER_SITE_URL=https://yoursite.com OPENROUTER_APP_NAME=YourAppName
Run a named mode:
./generate_mode.sh generative path/to/course-outline.pptxOr call the pipeline directly:
python -m src.pipeline.main \
--input path/to/course-outline.pptx \
--mode generative \
--mode-folder modular \
--reference-json prompts/reference.json \
--output results/outline_generative.jsonPDF inputs are uploaded to the model as PDFs. PPTX inputs are parsed locally into slide and speaker-note text, then sent to the same prompt as the outline source.
If you want to bypass the modular mode system and provide a custom guide directly, you can still use:
python -m src.pipeline.main \
--input path/to/input.pdf \
--guide prompts/guide_strategy3_validation.md \
--reference-json prompts/reference.json \
--output results/itell.json- Provide only
OPENROUTER_API_KEY(omitOPENAI_API_KEY) to automatically targethttps://openrouter.ai/api/v1. - Override with
OPENROUTER_BASE_URLor--base-urlif needed. - Most OpenRouter models use provider-scoped names such as
google/gemini-2.5-flash. - If you keep both OpenAI and OpenRouter keys, pass
--api-keyand--base-urlexplicitly.