类别:

字符串和二进制函数 (AI Functions) , 文件函数 (AI Functions)

AI_COMPLETE

备注

AI_COMPLETE 是 COMPLETE (SNOWFLAKE.CORTEX) 的更新版本。要获得最新功能,请使用 AI_COMPLETE。

使用支持的语言模型从文本或图像生成响应(补全)。您可以提供:

语法

该函数的语法取决于您提供的输入类型。有关语法的信息,请参阅以下部分:

访问控制要求

Users must use a role that has been granted the SNOWFLAKE.CORTEX_USER database role. See Cortex LLM privileges for more information on this privilege.

Error handling

By default, an AI_COMPLETE stops running when there's an error on a row. This behavior can disrupt large batch operations where an error can stop all processing. With error handling enabled, AI_COMPLETE can return NULL or an error object for rows that encounter non-fatal errors, while continuing to process other rows.

Use the following code to enable error handling for your session:

ALTER SESSION SET AI_SQL_ERROR_HANDLING_USE_FAIL_ON_ERROR=false;
Copy

For more information about error handling, see the following sections:

限制

Snowflake Cortex 函数不支持动态表。

语言: 中文