stream=true 时,接口返回 text/event-stream。Authorization: ********************{
"model": "deepseek-chat",
"messages": [
{
"role": "user",
"content": "用中文概括一下布隆过滤器的优缺点。"
}
]
}curl --location --request POST 'https://api.ccapi.ai//v1/chat/completions' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "deepseek-chat",
"messages": [
{
"role": "user",
"content": "用中文概括一下布隆过滤器的优缺点。"
}
]
}'{
"id": "chatcmpl_ds_001",
"object": "chat.completion",
"created": 1741852800,
"model": "deepseek-chat",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "布隆过滤器节省空间、查询快,但存在误判且不适合直接删除。"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 22,
"completion_tokens": 21,
"total_tokens": 43
}
}