Skip to main content

completions

Creates, updates, deletes, gets or lists a completions resource.

Overview

Namecompletions
TypeResource
Idopenai.chat.completions

Fields

NameDatatypeDescription
idstringA unique identifier for the chat completion.
choicesarrayA list of chat completion choices. Can be more than one if n is greater than 1.
createdintegerThe Unix timestamp (in seconds) of when the chat completion was created.
modelstringThe model used for the chat completion.
objectstringThe object type, which is always chat.completion.
service_tierstringThe service tier used for processing the request. This field is only included if the service_tier parameter is specified in the request.
system_fingerprintstringThis 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.
usageobjectUsage statistics for the completion request.

Methods

NameAccessible byRequired ParamsDescription
create_chat_completionSELECTdata__messages, data__model

SELECT examples

SELECT
id,
choices,
created,
model,
object,
service_tier,
system_fingerprint,
usage
FROM openai.chat.completions
WHERE data__messages = '{{ data__messages }}'
AND data__model = '{{ data__model }}';