from openai import OpenAI
client = OpenAI(
api_key="sk-",
base_url="https://api.deepseek.com"
)
response = client.chat.completions.create(
model="deepseek-v4-pro",
messages=[
{"role": "user", "content": "请写一篇超长的专业分析报告"}
],
max_tokens=384000, # 👈 1. 输出长度拉满到384K
reasoning_effort="max", # 👈 2. 推理强度拉到max
extra_body={"thinking": {"type": "enabled"}} # 开启思考模式
)
写这个也主要是给大家科普一下,好多佬友可能没有注意到。开了之后性能有不小的提升,不过API烧钱的速度也更快了![]()
3 个帖子 - 2 位参与者