DeepSeek · 10 सित॰ 2026 · प्रमुख
DeepSeek Recipe — V4 और V4.1 के लिए DeepSeek का आधिकारिक prompt encoder
संक्षेप में
DeepSeek Recipe एक MIT लाइसेंस वाली Rust लाइब्रेरी है, जिसमें Python bindings शामिल हैं। यह Messages, Chat Completions और Responses API अनुरोधों को DeepSeek V4 और V4.1 prompts में बदलती है, और फिर streamed output को हर फ़ॉर्मेट में वापस parse करती है।
DeepSeek · 10 सित॰ 2026 · 3 जाँचे गए स्रोत

DeepSeek की अपनी लाइब्रेरी, जो API अनुरोधों को V4 और V4.1 prompts में और streamed output को वापस responses में बदलती है।
मुख्य तथ्य
| निर्माता | DeepSeek |
|---|---|
| लाइसेंस | MIT |
| भाषा | Rust core के साथ Python bindings |
| Python package | deepseek-recipe 0.1.1 (Python 3.10+) |
| Rust crate | deepseek-recipe 0.1.0 |
| समर्थित मॉडल | DeepSeek V4 और V4.1 |
| अनुरोध फ़ॉर्मेट | Messages, Chat Completions, Responses |
यह क्या है?
DeepSeek Recipe, DeepSeek मॉडलों से जो prompt format वास्तव में अपेक्षित होता है, उसे सिर्फ़ विवरण के रूप में नहीं, बल्कि कोड के रूप में प्रकाशित करता है। एक Rust core, Messages, Chat Completions या Responses अनुरोध को एक साझा Conversation type में बदलता है, फिर उसे DeepSeek V4 और V4.1 के लिए prompt या token ids में रेंडर करता है, और मॉडल के output को मिलते-जुलते response shape में वापस parse करता है। Python bindings, example servers और एक browser demo भी उसी repository में मिलते हैं।
यह कैसे काम करता है?
हर समर्थित API फ़ॉर्मेट को एक ही Conversation representation में बदला जाता है, इसलिए हर फ़ॉर्मेट को बाकी हर फ़ॉर्मेट तक जाने के रास्ते की जगह सिर्फ़ एक converter चाहिए, अंदर आने के लिए और बाहर जाने के लिए। encoder thinking modes, reasoning effort, temperature, top_p और token limits को prompt तक पहुँचाता है, और V4.1 की preprocessing एक अलग image crate OpenCV के साथ करता है। Streamed output आते ही decode होता है, इसलिए reasoning content और client tool calls पहले से parse होकर वापस आते हैं।
यह क्यों मायने रखता है?
chat template को बारीकी से गलत करना आसान है, और गलत template बिना कोई error दिखाए accuracy की कीमत चुकाता है। encoder को MIT लाइसेंस वाले कोड के रूप में जारी करने से serving stacks, gateways और evaluation harnesses को DeepSeek V4 और V4.1 के लिए एक जाँचा जा सकने वाला reference मिलता है, न कि किसी model card से कॉपी किया गया template। यह अभी उपयोगी है, क्योंकि DeepSeek V4.1 Flash के weights कुछ ही दिन पुराने हैं।
यह किसके लिए है?
inference providers और API gateway बनाने वाले लोग
अक्सर पूछे जाने वाले प्रश्न
- क्या DeepSeek Recipe ओपन सोर्स है?
- DeepSeek Recipe MIT License के तहत जारी है, जो code और public documentation दोनों पर लागू होता है, और tokenizer files के लिए अलग notices हैं। यह उपलब्ध सबसे उदार लाइसेंसों में से एक है, इसलिए कोई commercial inference provider encoder को vendor करके उसमें बदलाव कर सकता है और बिना DeepSeek से कुछ पूछे उसे किसी closed product में शामिल कर सकता है।
- DeepSeek Recipe में अभी क्या समर्थित नहीं है?
- DeepSeek Recipe में कई चीज़ें लागू नहीं हैं: token probability outputs, document, audio और video inputs, file retrieval, server-side tool execution, JSON Schema और regex output constraints, प्रति अनुरोध एक से अधिक completion, apply_patch के अलावा custom Responses tools, और encrypted thinking content।
- DeepSeek Recipe images को कैसे संभालता है?
- Images DeepSeek Recipe तक base64 data के रूप में या URLs के रूप में पहुँचती हैं, और एक अलग image crate OpenCV का उपयोग करके DeepSeek V4.1 के लिए अपेक्षित preprocessing step लागू करता है। इससे pixel handling reference path जैसा ही रहता है, जो मायने रखता है, क्योंकि resize या crop में गड़बड़ी से vision tower वास्तव में जो देखता है, वह बदल जाता है।
- क्या मैं Python के साथ-साथ Rust से भी DeepSeek Recipe इस्तेमाल कर सकता हूँ?
- दोनों तरीके संभव हैं। Rust उपयोगकर्ता cargo add deepseek-recipe@0.1 deepseek-recipe-encoding@0.1 चलाते हैं, और Python 3.10+ उपयोगकर्ता PyPI से bindings इंस्टॉल करते हैं। Repository में दोनों भाषाओं में चलने योग्य example API servers भी हैं, एक Rust के लिए Axum पर और एक Python के लिए FastAPI पर, साथ ही encoded prompts की जाँच के लिए एक browser demo।
आज़माएँ
python3 -m pip install deepseek-recipe