AI Chat

Build a terminal travel-assistant chatbot with the Anthropic and OpenAI SDKs: multi-turn chat, system prompts and tool calling.

Published: 11/22/2026

Welcome to AI Chat.

You'll build a travel-assistant chatbot that runs in your terminal. First it only chats; then it gets tools, so it can look up today's date, do date arithmetic and fetch the current weather before it answers.

In the modules, you'll learn:

  • Why chat APIs are stateless and how your code keeps the conversation
  • How a system prompt shapes a chatbot
  • How tool calling works as a loop: the model asks, your code runs the tool, the model continues
  • How stop reasons, thinking and reasoning items affect the loop
  • Client-side versus server-side conversation state
  • How to put a cheap input guardrail in front of the main model, then generate test cases and measure how well it works (Module 3)
  • How to add OpenAI's Moderation API next to the guardrail, so a message is checked for both harm and topic (Module 4)
  • How to show the model's reasoning summaries (Anthropic, OpenAI)

šŸ‘‰ Set up first with the Setup reference šŸ‘‰ Start with Module 1 (Anthropic) šŸ‘‰ Continue with Module 2 (OpenAI) šŸ‘‰ Continue with Module 3 (Guardrails) šŸ‘‰ Finish with Module 4 (Moderation)

In development. This project is still growing. More modules will be added as they are finished.