// the find
steven-tey/chathn
Chat with Hacker News using natural language. Built with OpenAI Functions and Vercel AI SDK.
A Next.js chatbot that wraps the public Hacker News API with OpenAI function calling, letting you ask questions like 'what are today's top stories about Rust?' and get live answers. It's a clean, minimal demo of the Vercel AI SDK streaming pattern rather than a production tool. The target audience is developers learning how to wire up OpenAI function calling with a real external API.
The function-calling implementation is a good concrete example — the HN API functions are well-scoped and show exactly how to define tools, handle calls, and stream results back. One-click Vercel deploy with a single env var makes it genuinely easy to run. The codebase is tiny (one API route, one functions file) so it's readable in 15 minutes. Edge runtime usage keeps cold starts low for a chatbot UI.
Last commit was October 2023 — the Vercel AI SDK has had multiple breaking API changes since then, so the code likely needs updates to run against current package versions. No conversation memory or history beyond the current session; each question is essentially stateless relative to the previous answer. Scope is locked to whatever the public HN Firebase API exposes — no full-text search, no comments search, no way to ask about a specific thread by topic without knowing the ID. Pinned to gpt-3.5-turbo in the functions file with no easy way to swap models.