BaşlayınÜcretsiz Başlayın

Building multi-message conversations

The director of Aurora Robotics has asked you to prepare a brand-new workshop titled “Introduction to Robotics in Manufacturing.”, for an audience of manufacturing industry professionals who have no robotics background. Instead of writing every requirement into one giant prompt, you’ll build a multi-message dialogue with Claude: first asking for a rough outline, then refining it for the non-technical manufacturing audience.

The anthropic library and client are preloaded.

Bu egzersiz

Introduction to Claude Models

kursunun bir parçasıdır
Kursu Görüntüle

Egzersiz talimatları

  • Add a first user message asking Claude to help plan a workshop on "Introduction to Robotics in Manufacturing".
  • Add a follow-up user message specifying the audience as "manufacturing industry professionals with no robotics background".

Uygulamalı interaktif egzersiz

Bu örnek kodu tamamlayarak bu egzersizi bitirin.

messages = []

# Add first user message asking for workshop help
messages.append({"role": "user", "content": ____})

response = client.messages.create(model="claude-3-7-sonnet-latest", max_tokens=200, messages=messages)

messages.append({"role": "assistant", "content": response.content[0].text})

# Add follow-up message specifying target audience
messages.append({"role": "user", "content": ____})
Kodu Düzenle ve Çalıştır