ai_fix_grammar函式

適用於:標示為是Databricks SQL 標示為是Databricks Runtime

重要

此功能已符合 公開預覽 版及 HIPAA 規範。

預覽期間:

  • 底層語言模型能支援多種語言,但這個 AI 功能是針對英語調整的。
  • 請參閱 有限地區可用的功能 以了解 AI 功能的區域可用性。

這個 ai_fix_grammar() 功能讓你能調用最先進的 AI 模型,利用 SQL 修正文本中的語法錯誤。 此函數會使用 Databricks Foundation Model APIs 所提供之聊天模型服務端點。

需求

Apache 2.0 授權

目前可能使用的底層模型依照 Apache 2.0 授權,版權屬於 © Apache 軟體基金會。 客戶應負責確保遵循適用的模型授權。

Databricks 建議檢閱這些授權,以確保符合任何適用的條款。 如果未來模型根據 Databricks 的內部基準檢驗而表現更好,Databricks 可能會變更模型(以及此頁面上提供的適用授權清單)。

語法

ai_fix_grammar(content)

引數

  • content:STRING 運算式。

退貨

具有已更正文法的 STRING。

如果 content 是 NULL,結果就是 NULL。

範例

> SELECT ai_fix_grammar('This sentence have some mistake');
 "This sentence has some mistakes"

> SELECT ai_fix_grammar('She dont know what to did.');
 "She doesn't know what to do."

> SELECT ai_fix_grammar('He go to school every days.');
 "He goes to school every day."