SiliconFlow DeepSeek

复制成功!
开通模型开通后即可体验并通过 API 调用该模型。加入对比
文本生成

概述

文本生成

新版 DeepSeek-V3 (DeepSeek-V3-0324)与之前的 DeepSeek-V3-1226 使用同样的 base 模型,仅改进了后训练方法。新版 V3 模型借鉴 DeepSeek-R1 模型训练过程中所使用的强化学习技术,大幅提高了在推理类任务上的表现水平,在数学、代码类相关评测集上取得了超过 GPT-4.5 的得分成绩。此外该模型在工具调用、角色扮演、问答闲聊等方面也得到了一定幅度的能力提升。

输入

文本

输出

文本

功能

前缀补全

函数调用

缓存

结构化输出

批量任务

联网搜索

微调

定价

  • 输入
    ¥2/M tokens
  • 输出
    ¥8/M tokens

上下文

上下文
163.84K
最大输入
163.84K
最大输出
163.84K

速率限制

  • RPM每分钟请求数
    500
  • TPM每分钟 Token 数
    500K

API 参考

开通模型开通后即可体验并通过 API 调用该模型。
复制成功!
1234567891011121314151617181920212223
from openai import OpenAI
import os

client = OpenAI(
    api_key="sk-xxx",  # 替换为你的百炼API Key
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
)

completion = client.chat.completions.create(
    model="siliconflow/deepseek-v3-0324",
    messages=[{"role": "user", "content": "你是谁"}],
    extra_body={"enable_thinking": True},
    stream=True,
)

for chunk in completion:
    if not chunk.choices:
        continue
    delta = chunk.choices[0].delta
    if hasattr(delta, "reasoning_content") and delta.reasoning_content:
        print(delta.reasoning_content, end="", flush=True)
    if hasattr(delta, "content") and delta.content:
        print(delta.content, end="", flush=True)