Pre-session smoke test and check-in
This is the lesson instructors use to see who is ready before the first live session. Complete every item below and post your check-in in Maven or the cohort WhatsApp group before Friday.
Smoke test: one real model call
A health endpoint proves Python works. Week 1 needs a model call. Use your coding agent - do not hand-write from scratch unless you want the practice.
Your task
Prompt to paste into Cursor or Claude Code
In this project, add a POST /ask endpoint to my FastAPI app. It should read OPENAI_API_KEY from .env, accept JSON {"question": "..."}, call gpt-4o-mini once, and return {"answer": "...", "model": "gpt-4o-mini"}. Include python-dotenv, show me the curl command to test locally, and walk me through running it step by step.
- 1
Run locally
Start the server (`uvicorn main:app --reload`). Run the curl command your agent provided. You should get a real answer in JSON - not an auth error, not a connection refused.
- 2
If it fails
Paste the full error back into your agent. Typical fixes: wrong Python env (activate venv), missing `pip install`, invalid API key, or no billing credit. Loop until curl succeeds.
- 3
Read the code
Open `main.py` and trace the path: request in → model client → response out. You will direct this same stack all week; you need to recognise it when the agent changes it.
What to check in before the session
Post in Maven Student Home → General submissions, or share in the cohort WhatsApp group (WhatsApp is best for quick feedback).
Your task
Copy this template into Maven or WhatsApp
Pre-session check-in - [Your name] • Coding agent: Cursor / Claude Code (delete one) • Python version: [paste output of python3 --version] • Smoke test: POST /ask works locally (see screenshot) • OpenAI: key created + billing loaded (key NOT shared) • Capstone seed: [one sentence on what you are building] • Blocker (if any): [specific error or "none"]
- Screenshot of your terminal showing a successful curl to `/ask` with a real answer (redact nothing sensitive - there should be no API key in the terminal output).
- Screenshot of your coding agent open on the project folder (proves install).
- Your capstone one-liner - or link to your full seed doc if you already wrote it.
- Any blocker you could not fix after trying with your agent (we troubleshoot in office hours).
Critical
Why we ask for this
Friday sessions are live builds, not install clinics. Students who check in early get unstuck before session; students who skip pre-work lose the first hour to environment issues. The smoke test is the same shape as your Week 1 capstone endpoint - you are not doing extra work, you are starting early.
Done when
- POST /ask returns a real model answer via curl on your machine
- You posted the check-in template in Maven or WhatsApp with screenshots
- You can name which coding agent you are using
- Any blocker is posted (not silently stuck)
Share in Maven or WhatsApp: Your smoke-test screenshot, coding agent choice, Python version, capstone one-liner, and any blocker.
Go deeper (optional)