Skip to content

Files

Latest commit

b78c498 · Oct 15, 2024

History

History
37 lines (30 loc) · 8.52 KB

createcompletionresponse.md

File metadata and controls

37 lines (30 loc) · 8.52 KB

CreateCompletionResponse

Represents a completion response from the API. Note: both the streamed and non-streamed response objects share the same shape (unlike the chat endpoint).

Example Usage

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",
};

Fields

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.