ข้ามไปยังเนื้อหาหลัก

DeepSeek-V3.2

Chat completions บน DeepSeek-V3.2 ผ่าน endpoint ที่เข้ากันได้กับ OpenAI: deepseek-reasoner ส่งขั้นตอนการคิดมาพร้อมคำตอบ ส่วน deepseek-chat ตอบตรง

POST/v3/llm/deepseek-3p2/chat/completionsทดลองใช้

Input

model
deepseek-reasoner
messages
role: user content: สวัสดีครับ คุณช่วยอะไรได้บ้าง?
max_tokens
4096
temperature
0.7
top_p
0.9

OutputPOST /v3/llm/deepseek-3p2/chat/completions

{
  "id": "233c1fa8-e6ea-4b4f-86b5-2bbccb39fd9e",
  "object": "chat.completion",
  "created": 1764635256,
  "model": "deepseek-reasoner",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello there! How can I assist you today?",
        "reasoning_content": "Hmm, the user just greeted me with "Hello!". This is a straightforward opening greeting, so I should respond warmly and invitingly. I can start with a cheerful "Hello there!" to mirror their friendly tone, then offer my assistance to encourage them to share what they need. Keeping it simple and open-ended works best here since they haven't specified a request yet."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 109,
    "total_tokens": 121,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 96
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 12
  },
  "system_fingerprint": "fp_eaab8d114b_prod0820_fp8_kvcache"
}

ฟิลด์ทั้งหมดอยู่ในหัวข้อ Response

Request​

Response​

ออบเจ็กต์ chat completion แบบ OpenAI ตามตัวอย่างในแผงด้านข้าง คำตอบอยู่ที่ choices[0].message.content และ usage คือจำนวนโทเคนที่คิดเงิน ถ้าใช้ deepseek-reasoner ขั้นตอนการคิดจะอยู่ที่ message.reasoning_content และนับไว้ใน usage.completion_tokens_details.reasoning_tokens ถ้าใส่ stream: true จะได้เป็นบรรทัด data: ทีละ chunk แต่ละ chunk มี choices[0].delta และปิดท้ายด้วย data: [DONE]

รายละเอียดเพิ่มเติม​

© 2026 iApp Technology Co., Ltd.ข้อกำหนดการใช้งานนโยบายความเป็นส่วนตัวสถานะระบบsale@iapp.co.th