一共用了多少 token

👁️ 1 人浏览 💬 0 人评论 ❤️ 添加收藏

返回的 JSON:回答、停止原因、用量各在哪个字段

上一节那次请求,DeepSeek 返回了这样一段 JSON(示意):

{
  "id": "chatcmpl-123",
  "model": "deepseek-flash",
  "choices": [
    {
      "index": 0,
      "message": {"role": "assistant", "content": "I have my thesis defense next week."},
      "finish_reason": "stop"
    }
  ],
  "usage": {"prompt_tokens": 18, "completion_tokens": 9, "total_tokens": 27}
}

这次一共用了多少 token?只填数字。

提交要求: 只提交最终输出结果,不要添加多余的说明或引号。

提交你的答案
请登录后提交答案。
去登录
代码编辑器
Ctrl + Enter 运行
本次输入:
输出:

                        
👩‍🏫
AI
💬 题目评论
🔒 登录并作答后可看讨论