Brothers!!!

DeepSeek Coding Plan tutorial is here.

I'm Programmer Wan Feng, 300k+ followers across platforms, author of the python-office open source project.

Today I'll teach you 2 ways to play:

  1. API Call (simple and fast)
  2. Local Deployment (save money and free)

Choose based on your situation.


🚀 Way 1: API Call

Step 1: Get API Key

  1. Visit DeepSeek official website
  2. Register an account
  3. Get API Key

Step 2: Code Call

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import openai

# Configure DeepSeek API
openai.api_base = "https://api.deepseek.com"
openai.api_key = "your API Key"

# Call DeepSeek
response = openai.ChatCompletion.create(
model="deepseek-chat",
messages=[
{"role": "user", "content": "Help me write a Python quicksort"}
]
)

print(response.choices[0].message.content)

Step 3: Integrate with IDE

Supports VS Code, JetBrains and other mainstream IDEs.


💻 Way 2: Local Deployment

Recommended for those with some technical skills.

Benefits:

  • No API call fees
  • Completely private data
  • Can be used offline

Hardware Requirements

Model SizeMinimum VRAMRecommended Config
7B6GBGTX 1060+
13B12GBRTX 3060+
33B24GBRTX 4090+
67B48GBMulti-card server

Deployment Steps

1. Install Ollama

1
curl -fsSL https://ollama.com/install.sh | sh

2. Download Model

1
ollama pull deepseek-coder:6.7b

3. Run

1
ollama run deepseek-coder:6.7b

4. Call

1
2
3
4
5
6
7
8
9
10
11
12
13
import openai

openai.api_base = "http://localhost:11434/v1"
openai.api_key = "ollama"

response = openai.ChatCompletion.create(
model="deepseek-coder:6.7b",
messages=[
{"role": "user", "content": "Help me write a Python quicksort"}
]
)

print(response.choices[0].message.content)

📊 Comparison of Two Methods

DimensionAPI CallLocal Deployment
DifficultyLowMedium
CostAPI feesOne-time hardware investment
Data SecurityData on cloudCompletely private
Offline Available
Model UpdatesAutomaticManual

🎯 How to Choose?

  • Want to get started quickly → API Call
  • Pursuing lowest cost → Local Deployment
  • Have technical skills → Local Deployment
  • Don't want to tinker → API Call

📚 Want to Learn More?

Also welcome to the "30 Lectures · AI Programming Training Camp" that I collaborated with Turing Community on. 30 systematic lectures + 15+ practical projects, I'll take you from 0 to 1 in mastering AI programming.

👉 Click to view training camp details


💡 Finally

The 2 ways to play DeepSeek have no superiority or inferiority, only suitability or unsuitability.

Just choose based on your situation.

I'm Programmer Wan Feng, see you next time.


*For more AI programming content, welcome to visit my website: https://www.python4office.cn/


🤖 Developer Efficiency Tool Recommendations

👉 Want to experience MiniMax Token Plan? Click here for 10% discount

💡 Pay-per-use, very cost-effective! Imagine going to a vegetable market—buy a ticket to get in, and the vegetables are all yours. Charged per use, no limit on quota, pay for what you use. Perfect for developers!

🎓 AI Programming Course

Want to learn AI programming systematically? Check out CoderWanFeng's AI Programming Course!