跳至主要内容

完成物件

字段說明

參數類型描述
idstring完成的唯一標識符
choicesarray模型為輸入提示生成的完成選項列表
createdinteger創建完成的 Unix 時間戳(秒)
modelstring用於完成的模型
system_fingerprintstring模型運行所使用的後端配置指紋
objectstring對象類型,通常為 chat.completion
usageobject本次請求的使用統計信息
completion_tokensinteger輸出 token 數
prompt_tokensinteger輸入 token 數
total_tokensinteger總 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"
}

相關頁面