Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).
import { CreateCompletionResponse } from "argot-open-ai/models/components";
let value: CreateCompletionResponse = {
id: "<id>",
choices: [
{
finishReason: "content_filter",
index: 604846,
logprobs: {},
text: "<value>",
},
],
created: 739264,
model: "911",
object: "text_completion",
};
Field | Type | Required | Description |
---|---|---|---|
id |
string | ✔️ | A unique identifier for the completion. |
choices |
components.CreateCompletionResponseChoices[] | ✔️ | The list of completion choices the model generated for the input prompt. |
created |
number | ✔️ | The Unix timestamp (in seconds) of when the completion was created. |
model |
string | ✔️ | The model used for completion. |
systemFingerprint |
string | ➖ | This fingerprint represents the backend configuration that the model runs with. Can be used in conjunction with the seed request parameter to understand when backend changes have been made that might impact determinism. |
object |
components.CreateCompletionResponseObject | ✔️ | The object type, which is always "text_completion" |
usage |
components.CompletionUsage | ➖ | Usage statistics for the completion request. |