1. Learn
  2. /
  3. Courses
  4. /
  5. Working with DeepSeek in Python

Connected

Exercise

Find and replace

Find-and-replace tools have been around for decades, but they are often limited to identifying and replacing exact words or phrases. You've been provided with a block of text discussing cars, and you'll use a chat completion model to update the text to discuss planes instead, updating the text appropriately.

Instructions

100 XP
  • Create a request to send prompt to deepseek-ai/DeepSeek-V3, altering a passage of text about cars to planes; use a maximum of 100 tokens.
  • Extract and print the text response from the API.