1. Learn
  2. /
  3. Courses
  4. /
  5. Working with Llama 3

Connected

Exercise

Multi-turn conversations

Let's extend the travel chatbot to allow users to respond to the model's initial recommendation. You'll again use the Conversation class, but this time, you'll make repeated calls to the model to see how the model handles previous information.

As a reminder, here are the methods from the Conversation class:

  • __init__(self, llm: Llama, system_prompt='', history=[])
  • create_completion(self, user_prompt='')

Instructions

100 XP
  • Ask for an initial travel recommendation, and provide a follow-up request after the first model response.