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

Connected

अभ्यास

Creating an AI chatbot

To complete your POC, you'll integrate your message history with a for loop, so you can send repeated prompts to the model, storing each response in the message history in series.

निर्देश

100 XP
  • Loop over the user messages (user_msgs).
  • Create a dictionary for the user message in each iteration, and append it to messages.
  • Send messages to the model in a chat request.
  • Append the assistant message dictionary to messages.