रीज़निंग effort ट्यून करना
डिफ़ॉल्ट रूप से, V4-Pro "high" effort पर सोचता है. अगर किसी खास तौर पर कठिन समस्या पर इसे और ज़ोर लगवाना हो, तो reasoning_effort="max" सेट करें और मॉडल चरणों से गुज़रने में अधिक समय लगाएगा.
इस अभ्यास में, आप पिछले अभ्यास वाला वही math_problem भेजेंगे — इस बार reasoning_effort="max" के साथ — और देखेंगे कि प्रतिक्रिया का लेआउट कैसे बदलता है.
यह अभ्यास पाठ्यक्रम का हिस्सा है
Python में DeepSeek के साथ काम करना
अभ्यास निर्देश
math_problemको"deepseek-ai/DeepSeek-V4-Pro"पर भेजने के लिए एक रिक्वेस्ट बनाइए.- सोचने की तीव्रता बढ़ाने के लिए
reasoning_effortको"max"पर सेट कीजिए.
इंटरैक्टिव व्यावहारिक अभ्यास
इस अभ्यास को इस नमूना कोड को पूरा करके आज़माएँ।
client = OpenAI(api_key="", base_url="https://api.together.xyz/v1")
# Crank up the reasoning effort
response = client.chat.completions.create(
model="deepseek-ai/____",
reasoning_effort=____,
max_tokens=600,
messages=[
{"role": "user",
"content": math_problem}]
)
print(response.choices[0].message.content)