完成物件
字段說明
| 參數 | 類型 | 描述 |
|---|---|---|
| id | string | 完成的唯一標識符 |
| choices | array | 模型為輸入提示生成的完成選項列表 |
| created | integer | 創建完成的 Unix 時間戳(秒) |
| model | string | 用於完成的模型 |
| system_fingerprint | string | 模型運行所使用的後端配置指紋 |
| object | string | 對象類型,通常為 chat.completion |
| usage | object | 本次請求的使用統計信息 |
| completion_tokens | integer | 輸出 token 數 |
| prompt_tokens | integer | 輸入 token 數 |
| total_tokens | integer | 總 token 數 |
示例
{
"id": "chatcmpl-AFNKwYwdb3KmPV3MT7yT0TBylkuH5",
"object": "chat.completion",
"created": 1728227990,
"model": "gpt-4o-2024-08-06",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This is a test!"
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 13,
"completion_tokens": 5,
"total_tokens": 18
},
"system_fingerprint": "fp_67802d9a6d"
}