This site is not affiliated with or endorsed by Vercel, Inc. Read the docs, then deploy or run each experiment yourself.
AI

Tutor Chat Lab

Streamed tutoring chat grounded in a topic you set; uses AI SDK streamText with honest 503 when no provider.

Run this experiment yourself

Demos are not embedded on this site. Deploy a standalone copy on Vercel or run the experiment app locally.

Local development

cd apps/experiments/tutor-chat-lab
pnpm install
pnpm dev

Then open http://localhost:3010.

This is an experimental demo. Use it as a starting point for your own projects.

Tutor Chat Lab is a Batch G vertical mini composition lab. Pure helpers live in logic.ts; AI calls return an honest 503 when no provider is configured.

Features

  • streamText tutoring grounded in a topic
  • Message history normalization in logic.ts
  • Honest 503 without AI keys

Server Reference

POST /api/tutor

{ "topic": "..." }
StatusCause
200Success (or stream)
400Missing / invalid input
503No AI provider (AI_GATEWAY_API_KEY or OPENAI_API_KEY)

Limitations

  • Not a full LMS.
  • No auth / rate limits.
  • Length-capped inputs.

Deployment

Deploy on Vercel

Local Development

cd apps/experiments/tutor-chat-lab
pnpm install
pnpm dev

Configuration

VariableRequiredPurpose
AI_GATEWAY_API_KEYYes (or OpenAI)Preferred AI provider
OPENAI_API_KEYNoFallback
AI_MODELNoModel override

Next Steps

On this page