Pirate Chat Bot

Guided project tutorial

Arrrr matey! Welcome to this interactive project tutorial. In this series of lessons you are going to build a chat application powered by ChatGPT, but with a twist - the chat assistant always talks in the style of a pirate! The project will consist of a front end written in Typescript + React, and a backend cloud function that makes calls to the OpanAI API.

What You Will Learn

  • Calling the OpenAI API from TypeScript
  • 💬 LLM prompt structuring + system prompts
  • AWS Lambda cloud functions in TypeScript
  • Basic front end in React + TypeScript
  • HTML form validation
  • CSS Variables + Flexbox

AI Coding Tutor

This project includes an AI assistant that will answer questions, offer further information, and give you hints if you get stuck.

Contents

Page Layout

Managing State

The Back End

After completing all the lessons above you will have a complete project! You can download your progress as a .ZIP file at any time

Take The Quiz

Try your knowledge of the topics covered in this project with this mobile friendly, multiple choice quiz!

Start Quiz

Calling OpenAI in TypeScript Quiz

Question 3

How do you import the OpenAI package in a TypeScript file?

Â