Hugging Face · Schema
ChatCompletionResponse
Properties
| Name | Type | Description |
|---|---|---|
| id | string | Unique completion identifier |
| object | string | |
| created | integer | Unix timestamp |
| model | string | Model used |
| system_fingerprint | string | |
| choices | array | |
| usage | object |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/ChatCompletionResponse",
"title": "ChatCompletionResponse",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique completion identifier",
"example": "abc123"
},
"object": {
"type": "string",
"const": "chat.completion",
"example": "example_value"
},
"created": {
"type": "integer",
"description": "Unix timestamp",
"example": 10
},
"model": {
"type": "string",
"description": "Model used",
"example": "example_value"
},
"system_fingerprint": {
"type": "string",
"example": "example_value"
},
"choices": {
"type": "array",
"items": {
"type": "object",
"properties": {
"index": {
"type": "integer"
},
"message": {
"type": "object",
"properties": {
"role": {
"type": "string"
},
"content": {
"type": "string"
},
"tool_calls": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"function": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"arguments": {
"type": "string"
}
}
}
}
}
}
}
},
"finish_reason": {
"type": "string",
"enum": [
"stop",
"length",
"tool_calls",
"content_filter"
]
},
"logprobs": {
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"logprob": {
"type": "number"
},
"top_logprobs": {
"type": "array",
"items": {
"type": "object",
"properties": {
"token": {
"type": "string"
},
"logprob": {
"type": "number"
}
}
}
}
}
}
}
}
}
}
},
"example": []
},
"usage": {
"$ref": "#/components/schemas/Usage"
}
}
}