Overview
DeepSeekLLMService provides access to DeepSeek’s language models through an OpenAI-compatible interface. It inherits from OpenAILLMService and supports streaming responses, function calling, and context management with advanced reasoning capabilities.
DeepSeek LLM API Reference
Pipecat’s API methods for DeepSeek integration
Example Implementation
Complete example with function calling
DeepSeek Documentation
Official DeepSeek API documentation and features
DeepSeek Platform
Access models and manage API keys
Installation
To use DeepSeek services, install the required dependency:Prerequisites
DeepSeek Account Setup
Before using DeepSeek LLM services, you need:- DeepSeek Account: Sign up at DeepSeek Platform
- API Key: Generate an API key from your account dashboard
- Model Selection: Choose from available DeepSeek models with reasoning capabilities
Required Environment Variables
DEEPSEEK_API_KEY: Your DeepSeek API key for authentication
Configuration
str
required
DeepSeek API key for authentication. Raises
ValueError when empty.str
default:"https://api.deepseek.com/v1"
Base URL for DeepSeek API endpoint.
str
default:"None"
deprecated
Deprecated since 0.0.105, removed in 2.0.0. Use
settings=DeepSeekLLMService.Settings(model=...) instead.Settings
Runtime-configurable settings passed via thesettings constructor argument using DeepSeekLLMService.Settings(...). These can be updated mid-conversation with LLMUpdateSettingsFrame. See Service Settings for details.
DeepSeekLLMService.ThinkingConfig | None
default:"DeepSeekThinkingConfig(type='disabled')"
Thinking mode configuration. The service defaults this to disabled: DeepSeek’s V4 models otherwise run a reasoning pass before every answer, which delays the first spoken token. Set
DeepSeekThinkingConfig(type="enabled") to turn it on, or None to leave the choice to DeepSeek’s own default.ThinkingConfig fields:type(str): Thinking mode. DeepSeek’s V4 models think before answering unless"disabled"turns it off, which for real-time voice cuts the time to the first answer token. Values:"enabled","disabled".
OpenAILLMService. See OpenAI LLM Settings for the full parameter reference. The service defaults to model="deepseek-flash" when no model is specified.
Usage
Basic Setup
With Custom Settings
With Thinking Mode Enabled
Notes
seedandmax_completion_tokensare not sent by this service, so they have no effect. Usemax_tokensinstead.run_inference()ignoresresponse_schemawith a warning, so the reply isn’t constrained to the schema.