From the course: Building a Project with the ChatGPT API

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Challenge: Generate tweet content using chat completion

Challenge: Generate tweet content using chat completion - ChatGPT Tutorial

From the course: Building a Project with the ChatGPT API

Challenge: Generate tweet content using chat completion

(upbeat music) - Let's build on the last hands-on challenge by incorporating a multi-turn conversation with the AI assistant. We want to include a prompt, instructing the model to remember the conversation and summarize a website in a tweet-friendly format. Start by going to your existing Jupyter Notebook. Review your code to refresh your memory on how the existing code works. Don't forget that each interaction with the AI assistant is a new session. If you want the model to remember the conversation and have the proper context to produce output, you must include the entire message history, meaning all the prompts and responses with each request. Take a look at Python's input function to see if it could be helpful as you solve this challenge. Good luck, and have fun. I can't wait to share my solution with you in the following video.

Contents