Member-only story
Agentic AI
Integrating LlamaIndex and DeepSeek-R1 for reasoning_content and Function Call Features
Empowering AgentWorkflow with the strong boost from DeepSeek-R1
In today’s article, I’ll show you how to use LlamaIndex’s AgentWorkflow to read the reasoning process from DeepSeek-R1’s output and how to enable function call features for DeepSeek-R1 within AgentWorkflow.
All the source code discussed is available at the end of this article for you to read and modify freely.
Introduction
DeepSeek-R1 is incredibly useful. Most of my work is now done with its help, and major cloud providers support its deployment, making API access even easier.
Most open-source models support OpenAI-compatible API interfaces, and DeepSeek-R1 is no exception. However, unlike other generative models, DeepSeek-R1 includes a reasoning_content
key in its output, which stores the Chain-of-Thought (CoT) reasoning process.
Additionally, DeepSeek-R1 doesn’t support function calls, which makes developing agents with it quite challenging. (The official documentation claims that DeepSeek-R1 doesn’t support structured output, but in my tests, it does. So, I won’t cover that here.)