1. सीखें
  2. /
  3. पाठ्यक्रम
  4. /
  5. Working with DeepSeek in Python

Connected

अभ्यास

Creating a reasoning chatbot for coding

Let's put everything together to build a reasoning chatbot for coding assistance!

You've been provided with two user messages: one to request Python code for a particular task, and a follow-up message requesting that it be written with a particular library.

Let's see how the reasoning model does!

निर्देश

100 XP
  • Loop over the user questions.
  • Send each user question, q, to the deepseek-ai/DeepSeek-R1 model.
  • Extract the response content to strip it of thinking tokens before appending it to messages.