CommencerCommencez gratuitement

Your first DeepSeek request!

To preview what's ahead, the Python code for sending a request to a DeepSeek model is ready for you.

Pass any question or instruction to the content argument and see how DeepSeek responds!


Here are two prompts to try if you're struggling for ideas:

  • In one sentence, how did DeepSeek revolutionize LLMs?
  • In one sentence, how can DeepSeek be used to upskill myself?

Cet exercice fait partie du cours

<cours>Working with DeepSeek in Python</cours>
Voir le cours

Instructions de l’exercice

  • Enter your prompt replacing INSERT YOUR PROMPT HERE, experiment, and submit your answer when ready!

Exercice interactif pratique

Essayez cet exercice en complétant ce code d’exemple.

response = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-V4-Pro",
    max_tokens=300,
  
    # Enter your prompt
    messages=[{"role": "user", "content": "INSERT YOUR PROMPT HERE"}]
)

print(response.choices[0].message.content)
Modifier et exécuter le code