Telegram bot for extracting daily steps from fitness app screenshots using OpenAI vision.
# Install dependencies
uv sync
# Configure environment
cp .env.example .env
# Add your OPENAI_API_KEY and TELEGRAM_BOT_TOKEN to .env
# Install pre-commit hooks
uv run pre-commit install# Run tests
uv run pytest
# Format code
uv run black src/ tests/ evals/
uv run ruff check src/ tests/ evals/ --fix
# Run evaluations (requires real screenshots and API key)
uv run pytest evals/ -m eval -v -sfrom topot.llm import OpenAIClient, load_prompt
client = OpenAIClient()
prompt = load_prompt("extract_daily_steps")
result = client.extract_steps_from_image(
image_url="data:image/jpeg;base64,...",
prompt=prompt
)
print(f"Steps: {result.answer}")Add screenshots to evals/screenshots/, update evals/expected_results.yaml, then run:
uv run pytest evals/ -m eval -v -sEval tests are excluded from regular test runs and pre-commit hooks.