Complete the object

Represents a completion response object from the API. Note: Streaming response and non-streaming response objects have the same structure (different from chat endpoints).

id

string

Unique identifier of completion

choices

array

A list of completion options generated by the model for input prompts

created

integer

Unix timestamp of creation completion (seconds)

model

string

Model for completion

system_fingerprint

string

This fingerprint represents the backend configuration of the model run

object

string

Object type, always "text_completion"

usage

object

Fulfillment of requested usage statistics

completion_tokens

integer

Number of tags in completions generated

prompt_tokens

integer

Number of tags in prompt

total_tokens

integer

Total number of tags used in request (hint + complete)

{
  "id": "cmpl-uqkvlQyYK7bGYrRHQ0eXlWi7",
  "object": "text_completion",
  "created": 1589478378,
  "model": "gpt-3.5-turbo",
  "choices": [
    {
      "text": "\n\nThis is indeed a test",
      "index": 0,
      "logprobs": null,
      "finish_reason": "length"
    }
  ],
  "usage": {
    "prompt_tokens": 5,
    "completion_tokens": 7,
    "total_tokens": 12
  }
}

Last updated