Skip to main content
Demonstrates built-in and DeepSeek-backed reasoning for historical analysis.
DeepSeek will retire the source’s deepseek-reasoner alias after July 24, 2026 at 15:59 UTC. Replace it with deepseek-v4-flash before running. See the DeepSeek V4 migration notice.
analyse_treaty_of_versailles.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your API keys

4

Update the DeepSeek model

Replace DeepSeek(id="deepseek-reasoner") with DeepSeek(id="deepseek-v4-flash") in the saved file.
5

Run the example

Save the code above as analyse_treaty_of_versailles.py, then run:
Full source: cookbook/10_reasoning/agents/analyse_treaty_of_versailles.py