Skip to content

Commit 223f1c2

Browse files
AI Translate 11-ai-functions to Simplified-Chinese (5/5) (#2391)
* 🌐 Translate 02-ai-embedding-vector.md to Simplified-Chinese Translated using anthropic/claude-sonnet-4 Directory: `docs/en/sql-reference/20-sql-functions/11-ai-functions` ### 📄 Translated Files | **Source** | **Output** | **Language** | | :--- | :--- | :--- | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | Simplified-Chinese | ### 📊 Translation Statistics - Session ID: 5336054 - File 1/5 (20.0%) - Total Time: 1m 32s - Input Tokens: 4,127 - Output Tokens: 4,154 - API Calls: 2 - Start Time: 2025-06-05 09:22:16 - End Time: 2025-06-05 09:23:49 * 🌐 Translate _category_.json to Simplified-Chinese Translated using anthropic/claude-sonnet-4 Directory: `docs/en/sql-reference/20-sql-functions/11-ai-functions` ### 📄 Translated Files | **Source** | **Output** | **Language** | | :--- | :--- | :--- | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | Simplified-Chinese | ### 📊 Translation Statistics - Session ID: 5336054 - File 2/5 (40.0%) - Total Time: 1m 48s - Input Tokens: 5,524 - Output Tokens: 5,388 - API Calls: 4 - Start Time: 2025-06-05 09:22:16 - End Time: 2025-06-05 09:24:05 * 🌐 Translate index.md to Simplified-Chinese Translated using anthropic/claude-sonnet-4 Directory: `docs/en/sql-reference/20-sql-functions/11-ai-functions` ### 📄 Translated Files | **Source** | **Output** | **Language** | | :--- | :--- | :--- | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/index.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/index.md` | Simplified-Chinese | ### 📊 Translation Statistics - Session ID: 5336054 - File 3/5 (60.0%) - Total Time: 2m 29s - Input Tokens: 7,690 - Output Tokens: 7,356 - API Calls: 6 - Start Time: 2025-06-05 09:22:16 - End Time: 2025-06-05 09:24:45 * 🌐 Translate 03-ai-text-completion.md to Simplified-Chinese Translated using anthropic/claude-sonnet-4 Directory: `docs/en/sql-reference/20-sql-functions/11-ai-functions` ### 📄 Translated Files | **Source** | **Output** | **Language** | | :--- | :--- | :--- | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/index.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/index.md` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/03-ai-text-completion.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/03-ai-text-completion.md` | Simplified-Chinese | ### 📊 Translation Statistics - Session ID: 5336054 - File 4/5 (80.0%) - Total Time: 3m 44s - Input Tokens: 11,042 - Output Tokens: 11,164 - API Calls: 8 - Start Time: 2025-06-05 09:22:16 - End Time: 2025-06-05 09:26:01 * 🌐 Translate 01-ai-to-sql.md to Simplified-Chinese Translated using anthropic/claude-sonnet-4 Directory: `docs/en/sql-reference/20-sql-functions/11-ai-functions` ### 📄 Translated Files | **Source** | **Output** | **Language** | | :--- | :--- | :--- | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/02-ai-embedding-vector.md` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/_category_.json` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/index.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/index.md` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/03-ai-text-completion.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/03-ai-text-completion.md` | Simplified-Chinese | | `docs/en/sql-reference/20-sql-functions/11-ai-functions/01-ai-to-sql.md` | `docs/en/sql-reference/20-sql-functions/11-ai-functions/01-ai-to-sql.md` | Simplified-Chinese | ### 📊 Translation Statistics - Session ID: 5336054 - File 5/5 (100.0%) - Total Time: 4m 19s - Input Tokens: 16,189 - Output Tokens: 14,426 - API Calls: 10 - Start Time: 2025-06-05 09:22:16 - End Time: 2025-06-05 09:26:36 --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent ff8198f commit 223f1c2

File tree

5 files changed

+67
-67
lines changed

5 files changed

+67
-67
lines changed

docs/cn/sql-reference/20-sql-functions/11-ai-functions/01-ai-to-sql.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@
22
title: "AI_TO_SQL"
33
---
44

5-
将自然语言指令转换为 SQL 查询,使用最新的模型 `text-davinci-003`
5+
将自然语言指令转换为 SQL 查询,使用最新的 `text-davinci-003` 模型
66

7-
Databend 通过结合 OLAP 和 AI,提供了一种高效构建 SQL 查询的解决方案。通过此功能,可以用自然语言编写的指令转换为符合表结构的 SQL 查询语句。例如,可以提供一个句子如“获取所有价格为 10 美元或以下的商品”作为输入,并生成相应的 SQL 查询 `SELECT * FROM items WHERE price <= 10` 作为输出。
7+
Databend 通过结合 OLAP 和 AI 技术,为构建 SQL 查询提供了高效的解决方案。通过此函数,自然语言指令可转换为符合表结构的 SQL 查询语句。例如,该函数可接收类似"获取所有价格不超过 10 美元的商品"的输入,并生成相应的 SQL 查询 `SELECT * FROM items WHERE price <= 10` 作为输出。
88

9-
主要代码实现可以在[这里](https://github.com/databendlabs/databend/blob/1e93c5b562bd159ecb0f336bb88fd1b7f9dc4a62/src/query/service/src/table_functions/openai/ai_to_sql.rs)找到。
9+
主要代码实现可在[这里](https://github.com/databendlabs/databend/blob/1e93c5b562bd159ecb0f336bb88fd1b7f9dc4a62/src/query/service/src/table_functions/openai/ai_to_sql.rs)找到。
1010

1111
:::note
12-
生成的 SQL 查询语句遵循 PostgreSQL 标准,因此可能需要手动修改以符合 Databend 的语法
12+
生成的 SQL 查询语句遵循 PostgreSQL 标准,因此可能需要手动调整以符合 Databend 语法
1313
:::
1414

1515
:::info
16-
Databend v1.1.47 开始,Databend 支持[Azure OpenAI 服务](https://azure.microsoft.com/en-au/products/cognitive-services/openai-service)
16+
Databend v1.1.47 ,Databend 支持 [Azure OpenAI 服务](https://azure.microsoft.com/en-au/products/cognitive-services/openai-service)
1717

18-
此集成提供了改进的数据隐私
18+
此集成提供更优的数据隐私保护
1919

2020
要使用 Azure OpenAI,请在 `[query]` 部分添加以下配置:
2121

@@ -29,11 +29,11 @@ openai_api_version = "2023-03-15-preview"
2929
:::
3030

3131
:::caution
32-
Databend 依赖(Azure) OpenAI 进行 `AI_TO_SQL`但仅将表结构发送到(Azure) OpenAI,而非数据
32+
Databend 依赖 (Azure) OpenAI 实现 `AI_TO_SQL`但仅向 (Azure) OpenAI 发送表结构,不发送数据
3333

34-
它们仅在 Databend 配置包含 `openai_api_key` 时才会生效,否则将处于非活动状态。
34+
该功能仅在 Databend 配置中包含 `openai_api_key` 时生效,否则将处于非活动状态。
3535

36-
此功能默认在[Databend Cloud](https://databend.com)上使用我们的 Azure OpenAI 密钥提供。如果您使用它们,即表示您确认您的表结构将由我们发送至 Azure OpenAI。
36+
此功能在 [Databend Cloud](https://databend.com) 上默认可用,使用我们的 Azure OpenAI 密钥。使用即表示您同意我们将表结构发送至 Azure OpenAI。
3737
:::
3838

3939
## 语法
@@ -43,10 +43,10 @@ USE <your-database>;
4343
SELECT * FROM ai_to_sql('<natural-language-instruction>');
4444
```
4545

46-
:::tip 获取并配置 OpenAI API 密钥
46+
:::tip 获取和配置 OpenAI API 密钥
4747

48-
- 要获取您的 openAI API 密钥,请访问 https://platform.openai.com/account/api-keys 并生成一个新密钥。
49-
-**databend-query.toml** 文件中配置 openai_api_key 设置
48+
- 获取 OpenAI API 密钥,请访问 https://platform.openai.com/account/api-keys 并生成新密钥
49+
-**databend-query.toml** 文件中配置 openai_api_key 设置
5050

5151
```toml
5252
[query]
@@ -58,9 +58,9 @@ openai_api_key = "<your-key>"
5858

5959
## 示例
6060

61-
在此示例中,通过 AI_TO_SQL 函数从指令生成 SQL 查询语句,并执行生成的语句以获取查询结果
61+
本示例使用 AI_TO_SQL 函数从指令生成 SQL 查询语句,并执行该语句获取查询结果
6262

63-
1. 准备数据
63+
1. 准备数据
6464

6565
```sql
6666
CREATE DATABASE IF NOT EXISTS openai;
@@ -81,14 +81,14 @@ CREATE TABLE orders(
8181
order_date DATE
8282
);
8383

84-
-- 向users表插入示例数据
84+
-- 向 users 表插入示例数据
8585
INSERT INTO users VALUES (1, 'Alice', 31, 'USA'),
8686
(2, 'Bob', 32, 'USA'),
8787
(3, 'Charlie', 45, 'USA'),
8888
(4, 'Diana', 29, 'USA'),
8989
(5, 'Eva', 35, 'Canada');
9090

91-
-- 向orders表插入示例数据
91+
-- 向 orders 表插入示例数据
9292
INSERT INTO orders VALUES (1, 1, 'iPhone', 1000.00, '2022-03-05'),
9393
(2, 1, 'OpenAI Plus', 20.00, '2022-03-06'),
9494
(3, 2, 'OpenAI Plus', 20.00, '2022-03-07'),
@@ -97,14 +97,14 @@ INSERT INTO orders VALUES (1, 1, 'iPhone', 1000.00, '2022-03-05'),
9797
(6, 3, 'AirPods', 200.00, '2022-03-14');
9898
```
9999

100-
2. 使用英语编写的指令作为输入运行 AI_TO_SQL 函数
100+
2. 运行 AI_TO_SQL 函数,输入英文指令
101101

102102
```sql
103103
SELECT * FROM ai_to_sql(
104-
'列出2022年来自美国的30岁以上用户按姓名分组的消费总额及订单数量');
104+
'List the total amount spent by users from the USA who are older than 30 years, grouped by their names, along with the number of orders they made in 2022');
105105
```
106106

107-
函数生成 SQL 语句作为输出
107+
函数输出生成的 SQL 语句
108108

109109
```sql
110110
*************************** 1. row ***************************
@@ -116,7 +116,7 @@ generated_sql: SELECT name, SUM(price) AS total_spent, COUNT(order_id) AS total_
116116
GROUP BY name;
117117
```
118118

119-
3. 运行生成的 SQL 语句以获取查询结果。
119+
3. 执行生成的 SQL 语句获取查询结果
120120

121121
```sql
122122
+---------+-------------+-------------+
@@ -126,4 +126,4 @@ generated_sql: SELECT name, SUM(price) AS total_spent, COUNT(order_id) AS total_
126126
| Alice | 2 | 1020.00 |
127127
| Charlie | 2 | 700.00 |
128128
+---------+-------------+-------------+
129-
```
129+
```
Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
---
22
title: "AI_EMBEDDING_VECTOR"
3-
description: "在 Databend 中使用 ai_embedding_vector 函数创建 embeddings"
3+
description: "在 Databend 中使用 ai_embedding_vector 函数创建嵌入向量"
44
---
55

6-
本文档概述了 Databend 中的 ai_embedding_vector 函数,并演示了如何使用此函数创建文档 embeddings
6+
本文档概述了 Databend 中的 ai_embedding_vector 函数,并演示如何使用此函数创建文档嵌入向量 (Embedding)
77

8-
主要代码实现在[这里](https://github.com/databendlabs/databend/blob/1e93c5b562bd159ecb0f336bb88fd1b7f9dc4a62/src/common/openai/src/embedding.rs)
8+
主要代码实现可在[此处](https://github.com/databendlabs/databend/blob/1e93c5b562bd159ecb0f336bb88fd1b7f9dc4a62/src/common/openai/src/embedding.rs)查看
99

10-
默认情况下,Databend 利用 [text-embedding-ada](https://platform.openai.com/docs/models/embeddings) 模型来生成 embeddings
10+
默认情况下,Databend 使用 [text-embedding-ada](https://platform.openai.com/docs/models/embeddings) 模型生成嵌入向量
1111

1212
:::info
13-
Databend v1.1.47 开始,Databend 支持 [Azure OpenAI service](https://azure.microsoft.com/en-au/products/cognitive-services/openai-service)
13+
Databend v1.1.47 起,支持 [Azure OpenAI 服务](https://azure.microsoft.com/en-au/products/cognitive-services/openai-service)
1414

15-
这种集成提供了改进的数据隐私
15+
此集成提供更优的数据隐私保护
1616

17-
要使用 Azure OpenAI,请将以下配置添加到 `[query]` 部分
17+
要使用 Azure OpenAI,请在 `[query]` 部分添加以下配置
1818

1919
```sql
2020
# Azure OpenAI
@@ -26,24 +26,24 @@ openai_api_version = "2023-03-15-preview"
2626
:::
2727

2828
:::caution
29-
Databend 依赖于 (Azure) OpenAI 来实现 `AI_EMBEDDING_VECTOR`并将 embedding 列数据发送到 (Azure) OpenAI。
29+
Databend 依赖 (Azure) OpenAI 实现 `AI_EMBEDDING_VECTOR`并将嵌入列数据发送至 (Azure) OpenAI。
3030

31-
只有当 Databend 配置包含 `openai_api_key` 时,它们才会工作,否则它们将处于非活动状态
31+
仅当 Databend 配置包含 `openai_api_key` 时功能生效,否则无法使用
3232

33-
此函数在 [Databend Cloud](https://databend.com) 上默认可用,使用我们的 Azure OpenAI 密钥。如果您使用它们,您承认您的数据将由我们发送到 Azure OpenAI。
33+
此函数在 [Databend Cloud](https://databend.com) 默认启用(使用我们的 Azure OpenAI 密钥)。使用即表示您同意数据由我们发送至 Azure OpenAI。
3434
:::
3535

3636
## ai_embedding_vector 概述
3737

38-
Databend 中的 `ai_embedding_vector` 函数是一个内置函数,用于为文本数据生成向量 embeddings。它对于自然语言处理任务非常有用,例如文档相似性、聚类和推荐系统。
38+
`ai_embedding_vector` 是 Databend 的内置函数,用于为文本数据生成向量嵌入。适用于自然语言处理任务,如文档相似度计算、聚类和推荐系统。
3939

40-
该函数接受文本输入,并返回一个高维向量,该向量表示输入文本的语义含义和上下文。embeddings 是使用大型文本语料库上的预训练模型创建的,从而捕获连续空间中单词和短语之间的关系
40+
该函数接收文本输入,返回表示语义和上下文的高维向量。嵌入通过预训练模型在大型语料库上生成,在连续空间中捕获词句间关系
4141

42-
## 使用 ai_embedding_vector 创建 embeddings
42+
## 使用 ai_embedding_vector 创建嵌入
4343

44-
要使用 `ai_embedding_vector` 函数为文本文档创建 embeddings,请按照以下示例操作。
44+
按以下示例操作,为文本文档生成嵌入:
4545

46-
1. 创建一个表来存储文档
46+
1. 创建存储文档的表
4747

4848
```sql
4949
CREATE TABLE documents (
@@ -54,7 +54,7 @@ CREATE TABLE documents (
5454
);
5555
```
5656

57-
2. 将示例文档插入到表中
57+
2. 插入示例文档
5858

5959
```sql
6060
INSERT INTO documents(id, title, content)
@@ -64,19 +64,19 @@ VALUES
6464
(3, 'Neural Networks Explained', 'A neural network is a series of algorithms that endeavors to recognize underlying relationships...'),
6565
```
6666

67-
3. 生成 embeddings
67+
3. 生成嵌入
6868

6969
```sql
7070
UPDATE documents SET embedding = ai_embedding_vector(content) WHERE embedding IS NULL;
7171
```
7272

73-
运行查询后,表中的 embedding 列将包含生成的 embeddings
73+
运行查询后,表中 embedding 列将包含生成的嵌入
7474

75-
embeddings 作为 `FLOAT` 值的数组存储在 embedding 列中,该列具有 `ARRAY(FLOAT NOT NULL)` 列类型
75+
嵌入以 `FLOAT` 值数组形式存储,列类型为 `ARRAY(FLOAT NOT NULL)`
7676

77-
现在,您可以将这些 embeddings 用于各种自然语言处理任务,例如查找相似文档或根据文档内容对文档进行聚类
77+
这些嵌入可用于多种自然语言处理任务,例如查找相似文档或基于内容聚类
7878

79-
4. 检查 embeddings
79+
4. 检查嵌入
8080

8181
```sql
8282
SELECT length(embedding) FROM documents;
@@ -89,4 +89,4 @@ SELECT length(embedding) FROM documents;
8989
+-------------------+
9090
```
9191

92-
上面的查询显示,为每个文档生成的 embeddings 的长度为 1536(维度)。
92+
该查询显示每个文档的嵌入长度为 1536(维度)。
Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
22
title: "AI_TEXT_COMPLETION"
3-
description: "使用 Databend 中的 ai_text_completion 函数生成文本补全"
4-
---
3+
description: "在 Databend 中使用 ai_text_completion 函数生成文本补全"
54

6-
本文档概述了 Databend 中的 `ai_text_completion` 函数,并演示了如何使用此函数生成文本补全
5+
本文档概述了 Databend 中的 `ai_text_completion` 函数,并演示如何使用该函数生成文本补全
76

8-
主要代码实现可以在[这里](https://github.com/databendlabs/databend/blob/1e93c5b562bd159ecb0f336bb88fd1b7f9dc4a62/src/common/openai/src/completion.rs)找到
7+
主要代码实现可在[此处](https://github.com/databendlabs/databend/blob/1e93c5b562bd159ecb0f336bb88fd1b7f9dc4a62/src/common/openai/src/completion.rs)查看
98

109
:::info
11-
Databend v1.1.47 开始,Databend 支持 [Azure OpenAI 服务](https://azure.microsoft.com/en-au/products/cognitive-services/openai-service)
10+
Databend v1.1.47 起,支持 [Azure OpenAI 服务](https://azure.microsoft.com/en-au/products/cognitive-services/openai-service)。
1211

13-
这一集成提供了更好的数据隐私保护
12+
该集成可提供更强的数据隐私保护
1413

15-
要使用 Azure OpenAI,请在 `[query]` 部分添加以下配置:
14+
使用 Azure OpenAI 需在 `[query]` 部分添加以下配置:
1615

1716
```sql
1817
# Azure OpenAI
@@ -24,35 +23,35 @@ openai_api_version = "2023-03-15-preview"
2423
:::
2524

2625
:::caution
27-
Databend 依赖 (Azure) OpenAI 进行 `AI_TEXT_COMPLETION`,并将补全提示数据发送到 (Azure) OpenAI。
26+
Databend 依赖 (Azure) OpenAI 实现 `AI_TEXT_COMPLETION` 功能,并将补全提示数据发送至 (Azure) OpenAI。
2827

29-
它们仅在 Databend 配置包含 `openai_api_key` 时有效,否则将处于非活动状态
28+
仅当配置中包含 `openai_api_key` 时该功能生效,否则无法使用
3029

31-
此功能默认在 [Databend Cloud](https://databend.com) 上使用我们的 Azure OpenAI 密钥提供。如果您使用它们,即表示您确认您的数据将由我们发送至 Azure OpenAI。
30+
[Databend Cloud](https://databend.com) 默认启用此功能(使用我们的 Azure OpenAI 密钥)。使用即表示您同意我们将数据发送至 Azure OpenAI。
3231
:::
3332

3433
## ai_text_completion 概述
3534

36-
Databend 中的 `ai_text_completion` 函数是一个内置函数,用于根据给定的提示生成文本补全。它在自然语言处理任务中非常有用,例如问答、文本生成和自动补全系统
35+
`ai_text_completion` 是 Databend 的内置函数,可根据给定提示生成文本补全。该函数适用于自然语言处理任务,如问答系统、文本生成和自动补全
3736

38-
该函数接受一个文本提示作为输入,并返回该提示的生成补全。补全使用在大规模文本语料库上预训练的模型创建,捕捉单词和短语之间的连续空间关系
37+
函数接收文本提示作为输入,返回生成的补全结果。补全内容由大型文本语料库预训练模型生成,在连续空间中捕捉单词与短语的关联关系
3938

4039
## 使用 ai_text_completion 生成文本补全
4140

42-
以下是一个使用 Databend 中的 `ai_text_completion` 函数生成文本补全的简单示例
41+
以下示例演示如何在 Databend 中使用 `ai_text_completion` 生成文本补全
4342

4443
```sql
45-
SELECT ai_text_completion('什么是人工智能?') AS completion;
44+
SELECT ai_text_completion('What is artificial intelligence?') AS completion;
4645
```
4746

48-
结果
47+
执行结果
4948

5049
```sql
5150
+--------------------------------------------------------------------------------------------------------------------+
5251
| completion |
5352
+--------------------------------------------------------------------------------------------------------------------+
54-
| 人工智能(AI)是专注于创建能够以模仿人类智能的方式思考、学习和解决问题的机器和软件的研究领域。这包括机器学习、自然语言处理、计算机视觉和机器人技术等领域。 |
53+
| Artificial intelligence (AI) is the field of study focused on creating machines and software capable of thinking, learning, and solving problems in a way that mimics human intelligence. This includes areas such as machine learning, natural language processing, computer vision, and robotics. |
5554
+--------------------------------------------------------------------------------------------------------------------+
5655
```
5756

58-
在这个示例中,我们向 `ai_text_completion` 函数提供提示 "什么是人工智能?",它返回一个生成的补全,简要描述了人工智能
57+
本示例中,向 `ai_text_completion` 输入提示 "What is artificial intelligence?" 后,函数返回生成的人工智能定义文本
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"label": "AI 函数"
2+
"label": "AI 函数(AI Functions)",
3+
"position": 20
34
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
2-
title: 'AI 函数(AI Functions)'
3-
description: '使用基于 SQL 的 AI 函数进行知识库搜索和文本补全'
2+
title: 'AI 函数'
3+
description: '使用基于 SQL 的 AI 函数实现知识库搜索和文本补全'
44
---
55

6-
本节提供 Databend 内置 AI 函数的参考信息,这些函数通过 SQL 直接提供自然语言处理、向量嵌入和文本生成功能。
6+
本节提供 Databend 内置 AI 函数的参考信息,这些函数通过 SQL 直接支持自然语言处理、向量嵌入和文本生成功能。
77

88
:::info
9-
Databend 的 AI 函数利用 OpenAI 模型,同时也支持 Azure OpenAI 服务以提高数据隐私保护。这些函数需要在 Databend 中配置 OpenAI API 密钥, Databend Cloud 上默认可用。
9+
Databend 的 AI 函数利用 OpenAI 模型,并支持 Azure OpenAI 服务以提升数据隐私保护。这些函数需要在 Databend 中配置 OpenAI API 密钥,并在 Databend Cloud 上默认可用。
1010
:::
1111

1212
## 可用的 AI 函数
1313

1414
| 函数 | 描述 | 示例 |
1515
|----------|-------------|--------|
16-
| [AI_TO_SQL](./01-ai-to-sql.md) | 将自然语言指令转换为 SQL 查询(Query) | `SELECT * FROM ai_to_sql('Get all products with price less than 100')` |
16+
| [AI_TO_SQL](./01-ai-to-sql.md) | 将自然语言指令转换为 SQL 查询 | `SELECT * FROM ai_to_sql('Get all products with price less than 100')` |
1717
| [AI_EMBEDDING_VECTOR](./02-ai-embedding-vector.md) | 为文本数据生成向量嵌入 | `SELECT ai_embedding_vector('How to use Databend')` |
18-
| [AI_TEXT_COMPLETION](./03-ai-text-completion.md) | 基于给定提示(Prompt)生成文本补全 | `SELECT ai_text_completion('What is a data warehouse?')` |
18+
| [AI_TEXT_COMPLETION](./03-ai-text-completion.md) | 基于给定提示生成文本补全 | `SELECT ai_text_completion('What is a data warehouse?')` |

0 commit comments

Comments
 (0)