Skip to main content

chat_completions

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

Overview

Namechat_completions
TypeResource
Idsnowflake.cortex.chat_completions

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
idstringUnique completion identifier.
choicesarrayCompletion choices.
createdintegerUnix timestamp of creation.
modelstringModel used for the completion.
objectstringObject type (chat.completion).
system_fingerprintstringBackend configuration fingerprint.
usagestringCompletion token usage. (opaque JSON object)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
createselectendpointPerform LLM text completion inference using Chat Completions API format.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
endpointstringOrganization and account identifier (orgname-accountname) (default: orgname-accountname)

SELECT examples

Perform LLM text completion inference using Chat Completions API format.

SELECT
id,
choices,
created,
model,
object,
system_fingerprint,
usage
FROM snowflake.cortex.chat_completions
WHERE endpoint = '{{ endpoint }}' -- required
;