Skip to main content

completions

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

Overview

Namecompletions
TypeResource
Idsnowflake.cortex_inference.completions

Fields

The following fields are returned by SELECT queries:

SELECT not supported for this resource, use SHOW METHODS to view available operations for the resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
cortex_llm_inference_completeinsertendpointPerform LLM text completion inference, similar to snowflake.cortex.Complete.

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 Name (default: orgid-acctid)

INSERT examples

Perform LLM text completion inference, similar to snowflake.cortex.Complete.

INSERT INTO snowflake.cortex_inference.completions (
data__model,
data__messages,
data__temperature,
data__top_p,
data__max_tokens,
data__max_output_tokens,
data__response_format,
data__guardrails,
data__tools,
data__tool_choice,
data__provisioned_throughput_id,
data__sf-ml-xp-inflight-prompt-action,
data__sf-ml-xp-inflight-prompt-client-id,
data__sf-ml-xp-inflight-prompt-public-key,
data__stream,
endpoint
)
SELECT
'{{ model }}' --required,
'{{ messages }}' --required,
{{ temperature }},
{{ top_p }},
{{ max_tokens }},
{{ max_output_tokens }},
'{{ response_format }}',
'{{ guardrails }}',
'{{ tools }}',
'{{ tool_choice }}',
'{{ provisioned_throughput_id }}',
'{{ sf-ml-xp-inflight-prompt-action }}',
'{{ sf-ml-xp-inflight-prompt-client-id }}',
'{{ sf-ml-xp-inflight-prompt-public-key }}',
{{ stream }},
'{{ endpoint }}'
;