AI Briefing
KO

DeepSeek API Major Upgrade

Key point

DeepSeek API has added JSON Output, Function Calling, Chat Prefix Completion, and FIM.

1 / 2

Details

DeepSeek API has significantly expanded its features around /chat/completions and the new /completions. This update is open to both deepseek-chat and deepseek-coder models, and emphasizes compatibility with the OpenAI API.

The key changes are as follows.

  • JSON Output: You can set response_format to {'type': 'json_object'} to force valid JSON-format output.
  • Function Calling: You can connect to external tools to perform actual tasks, supporting up to 128 functions in a single call, with parallel function calls also possible.
  • Chat Prefix Completion: You can specify the beginning of the last assistant message so the model completes what follows. The base_url should use https://api.deepseek.com/beta, and the prefix of the last message must be set to True.
  • 8K max_tokens(Beta): The Beta API raises the max_tokens limit up to 8192, supporting longer output scenarios.

Also, the new /completions API offers FIM (Fill-In-the-Middle) Completion. This method fills in the middle given a prefix and suffix, making it suitable for uses like story completion or code completion, and follows the same pricing structure as Chat Completion.

To use the Beta features, you must set base_url to https://api.deepseek.com/beta in all cases. DeepSeek stated that the Beta API is still defined as an unstable feature, and that subsequent testing and release plans may change flexibly.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.