$ show Nutlope/llamatutor
Llama Tutor is an open-source AI personal tutor built as a Next.js application. It allows users to enter a topic and select an education level (elementary to graduate), then uses Exa search to fetch relevant web content and Together AI (Qwen2.5-7B-Instruct-Turbo) to generate a personalized lesson in streaming markdown. The application features conversational follow-ups, source display, and rate limiting via Upstash Redis. It integrates Helicone for observability and Plausible for analytics. The codebase is a monolith with App Router, client-side state, and edge-deployed API routes. The architecture is straightforward: the main page orchestrates chat and source retrieval, relying on a custom streaming utility for Together AI responses. While the components are functional and well-structured for a demo, only the streaming utility stands out as a potentially reusable pattern for other AI-powered applications.
The LLM identified 1 files worth highlighting for reuse:
A self-contained utility that streams chat completions from Together AI (via a Helicone proxy) using the Fetch API and a TransformStream. It handles SSE parsing with eventsource-parser, transforms the raw chunk into JSON payloads, and re-encodes them as SSE. This module demonstrates non-obvious skill in handling streaming data, error resilience, and transform streams, and can be extracted as a reusable pattern for any project requiring streaming AI responses.