Skip to content

[Deprecated]

chat_cortex() was renamed to chat_cortex_analyst() to distinguish it from the more general-purpose Snowflake Cortex chat function, chat_snowflake().

Usage

chat_cortex(
  account = snowflake_account(),
  credentials = NULL,
  model_spec = NULL,
  model_file = NULL,
  api_args = list(),
  echo = c("none", "text", "all")
)

Arguments

account

A Snowflake account identifier, e.g. "testorg-test_account". Defaults to the value of the SNOWFLAKE_ACCOUNT environment variable.

credentials

A list of authentication headers to pass into httr2::req_headers(), a function that returns them when called, or NULL, the default, to use ambient credentials.

model_spec

A semantic model specification, or NULL when using model_file instead.

model_file

Path to a semantic model file stored in a Snowflake Stage, or NULL when using model_spec instead.

api_args

Named list of arbitrary extra arguments appended to the body of every chat API call.

echo

One of the following options:

  • none: don't emit any output (default when running in a function).

  • text: echo text output as it streams in (default when running at the console).

  • all: echo all input and output.

Note this only affects the chat() method.