messages
Creates, updates, deletes, gets or lists a messages
resource.
Overview
Name | messages |
Type | Resource |
Id | snowflake.cortex_analyst.messages |
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:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
send_message | insert | endpoint | Send a data question to the Cortex Analyst |
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.
Name | Datatype | Description |
---|---|---|
endpoint | string | Organization and Account Name (default: orgid-acctid) |
INSERT
examples
- send_message
- Manifest
Send a data question to the Cortex Analyst
INSERT INTO snowflake.cortex_analyst.messages (
data__semantic_model_file,
data__semantic_model,
data__semantic_view,
data__semantic_models,
data__stream,
data__operation,
data__warehouse,
data__messages,
data__source,
data__experimental,
endpoint
)
SELECT
'{{ semantic_model_file }}',
'{{ semantic_model }}',
'{{ semantic_view }}',
'{{ semantic_models }}',
{{ stream }},
'{{ operation }}',
'{{ warehouse }}',
'{{ messages }}' --required,
'{{ source }}',
'{{ experimental }}',
'{{ endpoint }}'
RETURNING
request_id,
message,
response_metadata,
semantic_model_selection,
warnings
;
# Description fields are for documentation purposes
- name: messages
props:
- name: endpoint
value: string
description: Required parameter for the messages resource.
- name: semantic_model_file
value: string
description: >
The path to a file stored in a Snowflake Stage holding the semantic model yaml. Must be a fully qualified stage url
- name: semantic_model
value: string
description: >
A string containing the entire semantic model yaml
- name: semantic_view
value: string
description: >
The name of the Snowflake native semantic model object
- name: semantic_models
value: array
description: >
A list of semantic model objects. If set, other semantic model properties are ignored
- name: stream
value: boolean
description: >
Whether to stream the response or not
default: false
- name: operation
value: string
description: >
Whether to response with SQL or natural language. One of 'sql_generation' or 'answer_generation'
valid_values: ['sql_generation', 'answer_generation']
default: sql_generation
- name: warehouse
value: string
description: >
Warehouse name to use for result set handling. Only used when 'operation' is 'answer_generation'
- name: messages
value: array
- name: source
value: string
description: >
an optional field to specify the source of the request. e.g "eval", "prod"
- name: experimental
value: string
description: >
JSON serialized string of experimental API fields (undocumented).