Type alias CreateCompletionResponse Create Completion Response : { choices : { finish_reason : "stop" | "length" | "content_filter" ; index : number ; logprobs : { text_offset ?: number [] ; token_logprobs ?: number [] ; tokens ?: string [] ; top_logprobs ?: Record < string , number > [] ; } | null ; text : string ; } [] ; created : number ; id : string ; model : string ; object : string ; usage ?: CompletionUsage ; } Type declaration choices : { finish_reason : "stop" | "length" | "content_filter" ; index : number ; logprobs : { text_offset ?: number [] ; token_logprobs ?: number [] ; tokens ?: string [] ; top_logprobs ?: Record < string , number > [] ; } | null ; text : string ; } [] created : number id : string model : string object : string
Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).