@aigne/doc-smith 0.8.11-beta.6 → 0.8.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.aigne/doc-smith/config.yaml +2 -0
- package/.aigne/doc-smith/output/structure-plan.json +2 -2
- package/.aigne/doc-smith/preferences.yml +28 -20
- package/.aigne/doc-smith/upload-cache.yaml +702 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/README.md +1 -1
- package/agents/generate/document-structure-tools/add-document.mjs +35 -10
- package/agents/generate/document-structure-tools/delete-document.mjs +35 -12
- package/agents/generate/document-structure-tools/move-document.mjs +43 -17
- package/agents/generate/document-structure-tools/update-document.mjs +37 -10
- package/agents/generate/update-document-structure.yaml +1 -7
- package/agents/generate/user-review-document-structure.mjs +5 -4
- package/agents/translate/translate-document.yaml +1 -9
- package/agents/update/check-update-is-single.mjs +2 -1
- package/agents/update/document-tools/update-document-content.mjs +24 -14
- package/agents/update/fs-tools/glob.mjs +184 -0
- package/agents/update/fs-tools/grep.mjs +317 -0
- package/agents/update/fs-tools/read-file.mjs +307 -0
- package/agents/update/generate-document.yaml +4 -7
- package/agents/update/update-document-detail.yaml +6 -10
- package/agents/update/user-review-document.mjs +13 -13
- package/assets/screenshots/doc-complete-setup.png +0 -0
- package/assets/screenshots/doc-generate-docs.png +0 -0
- package/assets/screenshots/doc-generate.png +0 -0
- package/assets/screenshots/doc-generated-successfully.png +0 -0
- package/assets/screenshots/doc-publish.png +0 -0
- package/assets/screenshots/doc-regenerate.png +0 -0
- package/assets/screenshots/doc-translate-langs.png +0 -0
- package/assets/screenshots/doc-translate.png +0 -0
- package/assets/screenshots/doc-update.png +0 -0
- package/docs/advanced-how-it-works.ja.md +31 -31
- package/docs/advanced-how-it-works.md +9 -9
- package/docs/advanced-how-it-works.zh-TW.md +24 -24
- package/docs/advanced-how-it-works.zh.md +20 -20
- package/docs/advanced-quality-assurance.ja.md +57 -61
- package/docs/advanced-quality-assurance.md +57 -61
- package/docs/advanced-quality-assurance.zh-TW.md +57 -61
- package/docs/advanced-quality-assurance.zh.md +57 -61
- package/docs/advanced.ja.md +8 -4
- package/docs/advanced.md +7 -3
- package/docs/advanced.zh-TW.md +9 -5
- package/docs/advanced.zh.md +9 -5
- package/docs/changelog.ja.md +206 -29
- package/docs/changelog.md +177 -0
- package/docs/changelog.zh-TW.md +229 -52
- package/docs/changelog.zh.md +204 -27
- package/docs/cli-reference.ja.md +82 -52
- package/docs/cli-reference.md +56 -26
- package/docs/cli-reference.zh-TW.md +82 -52
- package/docs/cli-reference.zh.md +70 -40
- package/docs/configuration-interactive-setup.ja.md +45 -42
- package/docs/configuration-interactive-setup.md +8 -5
- package/docs/configuration-interactive-setup.zh-TW.md +26 -23
- package/docs/configuration-interactive-setup.zh.md +25 -22
- package/docs/configuration-language-support.ja.md +33 -63
- package/docs/configuration-language-support.md +32 -62
- package/docs/configuration-language-support.zh-TW.md +35 -65
- package/docs/configuration-language-support.zh.md +32 -62
- package/docs/configuration-llm-setup.ja.md +25 -23
- package/docs/configuration-llm-setup.md +20 -18
- package/docs/configuration-llm-setup.zh-TW.md +21 -19
- package/docs/configuration-llm-setup.zh.md +20 -18
- package/docs/configuration-preferences.ja.md +67 -52
- package/docs/configuration-preferences.md +56 -41
- package/docs/configuration-preferences.zh-TW.md +69 -54
- package/docs/configuration-preferences.zh.md +68 -53
- package/docs/configuration.ja.md +65 -81
- package/docs/configuration.md +19 -35
- package/docs/configuration.zh-TW.md +62 -79
- package/docs/configuration.zh.md +50 -67
- package/docs/features-generate-documentation.ja.md +44 -69
- package/docs/features-generate-documentation.md +36 -61
- package/docs/features-generate-documentation.zh-TW.md +42 -67
- package/docs/features-generate-documentation.zh.md +41 -67
- package/docs/features-publish-your-docs.ja.md +36 -36
- package/docs/features-publish-your-docs.md +2 -2
- package/docs/features-publish-your-docs.zh-TW.md +21 -21
- package/docs/features-publish-your-docs.zh.md +23 -23
- package/docs/features-translate-documentation.ja.md +40 -31
- package/docs/features-translate-documentation.md +15 -6
- package/docs/features-translate-documentation.zh-TW.md +37 -28
- package/docs/features-translate-documentation.zh.md +23 -14
- package/docs/features-update-and-refine.ja.md +68 -118
- package/docs/features-update-and-refine.md +58 -108
- package/docs/features-update-and-refine.zh-TW.md +67 -116
- package/docs/features-update-and-refine.zh.md +64 -114
- package/docs/features.ja.md +29 -19
- package/docs/features.md +25 -15
- package/docs/features.zh-TW.md +28 -18
- package/docs/features.zh.md +31 -21
- package/docs/getting-started.ja.md +40 -43
- package/docs/getting-started.md +36 -39
- package/docs/getting-started.zh-TW.md +38 -41
- package/docs/getting-started.zh.md +45 -48
- package/docs/overview.ja.md +63 -11
- package/docs/overview.md +60 -8
- package/docs/overview.zh-TW.md +67 -15
- package/docs/overview.zh.md +62 -10
- package/media.md +9 -9
- package/package.json +1 -1
- package/prompts/detail/custom/custom-components.md +304 -188
- package/prompts/detail/document-rules.md +4 -4
- package/prompts/detail/generate-document.md +21 -8
- package/prompts/detail/update-document.md +8 -12
- package/prompts/structure/update-document-structure.md +12 -8
- package/prompts/utils/feedback-refiner.md +3 -3
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +9 -9
- package/tests/agents/generate/user-review-document-structure.test.mjs +29 -8
- package/tests/agents/update/document-tools/update-document-content.test.mjs +115 -112
- package/tests/agents/update/fs-tools/glob.test.mjs +438 -0
- package/tests/agents/update/fs-tools/grep.test.mjs +279 -0
- package/tests/agents/update/fs-tools/read-file.test.mjs +553 -0
- package/tests/agents/update/user-review-document.test.mjs +48 -27
- package/types/document-schema.mjs +5 -6
- package/types/document-structure-schema.mjs +20 -8
|
@@ -1,94 +1,64 @@
|
|
|
1
1
|
# Language Support
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith
|
|
4
|
-
|
|
5
|
-
The translation workflow
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
direction: down
|
|
9
|
-
|
|
10
|
-
Source-Doc: {
|
|
11
|
-
label: "Source Document\n(e.g., English)"
|
|
12
|
-
shape: rectangle
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
AI-Engine: {
|
|
16
|
-
label: "AIGNE DocSmith\nAI Translation Engine"
|
|
17
|
-
shape: rectangle
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
Translated-Docs: {
|
|
21
|
-
label: "Translated Documents"
|
|
22
|
-
shape: rectangle
|
|
23
|
-
grid-columns: 3
|
|
24
|
-
|
|
25
|
-
zh: "简体中文"
|
|
26
|
-
ja: "日本語"
|
|
27
|
-
es: "Español"
|
|
28
|
-
fr: "Français"
|
|
29
|
-
de: "Deutsch"
|
|
30
|
-
more: "..."
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
Source-Doc -> AI-Engine: "`aigne doc translate`"
|
|
34
|
-
AI-Engine -> Translated-Docs: "Generates"
|
|
35
|
-
```
|
|
3
|
+
AIGNE DocSmith provides automated documentation translation into 12 languages, enabling you to generate and maintain localized content for a global audience. This functionality is primarily managed through the `aigne doc translate` command.
|
|
4
|
+
|
|
5
|
+
The translation workflow uses an AI engine to process your source documents and generate versions in your selected target languages. The `aigne doc translate` command offers an interactive interface to guide you through selecting documents and languages for translation.
|
|
6
|
+
|
|
7
|
+

|
|
36
8
|
|
|
37
9
|
## Supported Languages
|
|
38
10
|
|
|
39
|
-
DocSmith
|
|
40
|
-
|
|
41
|
-
| Language | Language Code |
|
|
42
|
-
|
|
43
|
-
| English | `en` |
|
|
44
|
-
| 简体中文 | `zh` |
|
|
45
|
-
| 繁體中文 | `zh-TW` |
|
|
46
|
-
| 日本語 | `ja` |
|
|
47
|
-
| 한국어 | `ko` |
|
|
48
|
-
| Español | `es` |
|
|
49
|
-
| Français | `fr` |
|
|
50
|
-
| Deutsch | `de` |
|
|
51
|
-
| Português | `pt` |
|
|
52
|
-
| Русский | `ru` |
|
|
53
|
-
| Italiano | `it` |
|
|
54
|
-
| العربية | `ar` |
|
|
11
|
+
DocSmith supports AI-powered translations for the following languages. Your project's primary language can be defined during the initial setup with `aigne doc init`, and you can select any number of the following languages for translation.
|
|
12
|
+
|
|
13
|
+
| Language | Language Code |
|
|
14
|
+
|---|---|
|
|
15
|
+
| English | `en` |
|
|
16
|
+
| 简体中文 | `zh` |
|
|
17
|
+
| 繁體中文 | `zh-TW` |
|
|
18
|
+
| 日本語 | `ja` |
|
|
19
|
+
| 한국어 | `ko` |
|
|
20
|
+
| Español | `es` |
|
|
21
|
+
| Français | `fr` |
|
|
22
|
+
| Deutsch | `de` |
|
|
23
|
+
| Português | `pt` |
|
|
24
|
+
| Русский | `ru` |
|
|
25
|
+
| Italiano | `it` |
|
|
26
|
+
| العربية | `ar` |
|
|
55
27
|
|
|
56
28
|
## How to Configure and Use Translation
|
|
57
29
|
|
|
58
|
-
|
|
30
|
+
Language settings are configured when you initialize a project. You can add new languages or translate existing documents at any time using the `aigne doc translate` command, which supports two operational modes.
|
|
59
31
|
|
|
60
32
|
### Interactive Mode for Guided Translation
|
|
61
33
|
|
|
62
|
-
For a step-by-step guided
|
|
34
|
+
For a step-by-step guided process, run the command without any arguments. This method is recommended for most users.
|
|
63
35
|
|
|
64
36
|
```bash Interactive Translation icon=lucide:wand
|
|
65
37
|
aigne doc translate
|
|
66
38
|
```
|
|
67
39
|
|
|
68
|
-
The interactive mode
|
|
40
|
+
The interactive mode presents a series of prompts, allowing you to select which documents to translate and choose your target languages from a list. This mode also allows you to add new translation languages to your project's configuration if they are not already included.
|
|
69
41
|
|
|
70
|
-
|
|
71
|
-
2. Choose one or more target languages from the supported list.
|
|
72
|
-
3. Add new translation languages to your project's configuration if they are not already included.
|
|
42
|
+

|
|
73
43
|
|
|
74
44
|
### Command-Line Arguments for Automation
|
|
75
45
|
|
|
76
|
-
For direct control or for use in automated scripts, you can specify documents and languages
|
|
46
|
+
For direct control or for use in automated scripts, you can specify documents and languages as command-line arguments. This method is suitable for integration into CI/CD pipelines.
|
|
77
47
|
|
|
78
48
|
```bash Command Example icon=lucide:terminal
|
|
79
49
|
# Translate overview.md and examples.md into Chinese and Japanese
|
|
80
50
|
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
81
51
|
```
|
|
82
52
|
|
|
83
|
-
|
|
53
|
+
The following table details the key parameters for the `translate` command:
|
|
84
54
|
|
|
85
55
|
| Parameter | Description |
|
|
86
56
|
|---|---|
|
|
87
|
-
| `--langs` |
|
|
88
|
-
| `--docs` |
|
|
89
|
-
| `--feedback` |
|
|
90
|
-
| `--glossary` |
|
|
57
|
+
| `--langs` | Specifies a target language code. This flag can be used multiple times to select several languages. |
|
|
58
|
+
| `--docs` | Specifies the path to a document to translate (e.g., `overview.md`). This flag can also be used multiple times. |
|
|
59
|
+
| `--feedback` | Provides specific instructions to guide the translation model (e.g., `"Use a formal tone"`). |
|
|
60
|
+
| `--glossary` | Uses a custom glossary file (e.g., `@path/to/glossary.md`) to ensure consistent translation of project-specific terms. |
|
|
91
61
|
|
|
92
62
|
---
|
|
93
63
|
|
|
94
|
-
This section
|
|
64
|
+
This section provides an overview of the available languages and how to enable them. For a complete guide on the translation workflow, refer to the [Translate Documentation](./features-translate-documentation.md) guide.
|
|
@@ -1,94 +1,64 @@
|
|
|
1
1
|
# 語言支援
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith
|
|
4
|
-
|
|
5
|
-
翻譯工作流程會透過 AI 引擎處理您的來源文件,以產生您所選目標語言的本地化版本。
|
|
6
|
-
|
|
7
|
-
```d2
|
|
8
|
-
direction: down
|
|
9
|
-
|
|
10
|
-
Source-Doc: {
|
|
11
|
-
label: "來源文件\n(例如,英文)"
|
|
12
|
-
shape: rectangle
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
AI-Engine: {
|
|
16
|
-
label: "AIGNE DocSmith\nAI 翻譯引擎"
|
|
17
|
-
shape: rectangle
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
Translated-Docs: {
|
|
21
|
-
label: "翻譯後的文件"
|
|
22
|
-
shape: rectangle
|
|
23
|
-
grid-columns: 3
|
|
24
|
-
|
|
25
|
-
zh: "简体中文"
|
|
26
|
-
ja: "日本語"
|
|
27
|
-
es: "Español"
|
|
28
|
-
fr: "Français"
|
|
29
|
-
de: "Deutsch"
|
|
30
|
-
more: "..."
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
Source-Doc -> AI-Engine: "`aigne doc translate`"
|
|
34
|
-
AI-Engine -> Translated-Docs: "產生"
|
|
35
|
-
```
|
|
3
|
+
AIGNE DocSmith 提供 12 種語言的自動化文件翻譯功能,讓您能夠為全球受眾產生並維護本地化內容。此功能主要透過 `aigne doc translate` 命令進行管理。
|
|
36
4
|
|
|
37
|
-
|
|
5
|
+
翻譯工作流程使用 AI 引擎處理您的來源文件,並產生您所選目標語言的版本。`aigne doc translate` 命令提供一個互動式介面,引導您選擇要翻譯的文件和語言。
|
|
38
6
|
|
|
39
|
-
|
|
7
|
+

|
|
40
8
|
|
|
41
|
-
|
|
42
|
-
|---|---|---|
|
|
43
|
-
| English | `en` | Hello |
|
|
44
|
-
| 简体中文 | `zh` | 你好 |
|
|
45
|
-
| 繁體中文 | `zh-TW` | 你好 |
|
|
46
|
-
| 日本語 | `ja` | こんにちは |
|
|
47
|
-
| 한국어 | `ko` | 안녕하세요 |
|
|
48
|
-
| Español | `es` | Hola |
|
|
49
|
-
| Français | `fr` | Bonjour |
|
|
50
|
-
| Deutsch | `de` | Hallo |
|
|
51
|
-
| Português | `pt` | Olá |
|
|
52
|
-
| Русский | `ru` | Привет |
|
|
53
|
-
| Italiano | `it` | Ciao |
|
|
54
|
-
| العربية | `ar` | مرحبا |
|
|
9
|
+
## 支援的語言
|
|
55
10
|
|
|
56
|
-
|
|
11
|
+
DocSmith 支援以下語言的 AI 翻譯。您可以在使用 `aigne doc init` 進行初始設定時定義專案的主要語言,並可選擇以下任何數量的語言進行翻譯。
|
|
57
12
|
|
|
58
|
-
|
|
13
|
+
| 語言 | 語言代碼 |
|
|
14
|
+
|---|---|
|
|
15
|
+
| 英語 | `en` |
|
|
16
|
+
| 简体中文 | `zh` |
|
|
17
|
+
| 繁體中文 | `zh-TW` |
|
|
18
|
+
| 日本語 | `ja` |
|
|
19
|
+
| 한국어 | `ko` |
|
|
20
|
+
| Español | `es` |
|
|
21
|
+
| Français | `fr` |
|
|
22
|
+
| Deutsch | `de` |
|
|
23
|
+
| Português | `pt` |
|
|
24
|
+
| Русский | `ru` |
|
|
25
|
+
| Italiano | `it` |
|
|
26
|
+
| العربية | `ar` |
|
|
27
|
+
|
|
28
|
+
## 如何設定與使用翻譯功能
|
|
29
|
+
|
|
30
|
+
語言設定在您初始化專案時進行配置。您可以隨時使用 `aigne doc translate` 命令新增語言或翻譯現有文件,該命令支援兩種操作模式。
|
|
59
31
|
|
|
60
32
|
### 用於引導式翻譯的互動模式
|
|
61
33
|
|
|
62
|
-
|
|
34
|
+
若要進行逐步引導的流程,請執行不含任何參數的命令。建議大多數使用者使用此方法。
|
|
63
35
|
|
|
64
|
-
```bash
|
|
36
|
+
```bash 互動式翻譯 icon=lucide:wand
|
|
65
37
|
aigne doc translate
|
|
66
38
|
```
|
|
67
39
|
|
|
68
|
-
|
|
40
|
+
互動模式會顯示一系列提示,讓您能夠選擇要翻譯的文件,並從清單中選擇您的目標語言。如果專案設定中尚未包含新的翻譯語言,此模式也允許您新增。
|
|
69
41
|
|
|
70
|
-
|
|
71
|
-
2. 從支援的清單中選擇一種或多種目標語言。
|
|
72
|
-
3. 如果專案設定中尚未包含新的翻譯語言,則可以將其新增。
|
|
42
|
+

|
|
73
43
|
|
|
74
44
|
### 用於自動化的命令列參數
|
|
75
45
|
|
|
76
|
-
|
|
46
|
+
為了直接控制或在自動化腳本中使用,您可以將文件和語言指定為命令列參數。此方法適合整合到 CI/CD 管線中。
|
|
77
47
|
|
|
78
|
-
```bash
|
|
48
|
+
```bash 命令範例 icon=lucide:terminal
|
|
79
49
|
# 將 overview.md 和 examples.md 翻譯成中文和日文
|
|
80
50
|
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
81
51
|
```
|
|
82
52
|
|
|
83
|
-
|
|
53
|
+
下表詳細說明了 `translate` 命令的主要參數:
|
|
84
54
|
|
|
85
55
|
| 參數 | 說明 |
|
|
86
56
|
|---|---|
|
|
87
|
-
| `--langs` |
|
|
88
|
-
| `--docs` |
|
|
89
|
-
| `--feedback` |
|
|
90
|
-
| `--glossary` |
|
|
57
|
+
| `--langs` | 指定目標語言代碼。此旗標可多次使用以選擇多種語言。 |
|
|
58
|
+
| `--docs` | 指定要翻譯的文件的路徑(例如 `overview.md`)。此旗標也可多次使用。 |
|
|
59
|
+
| `--feedback` | 提供具體指令以引導翻譯模型(例如 `「使用正式語氣」`)。 |
|
|
60
|
+
| `--glossary` | 使用自訂詞彙表檔案(例如 `@path/to/glossary.md`)以確保專案特定術語的翻譯一致性。 |
|
|
91
61
|
|
|
92
62
|
---
|
|
93
63
|
|
|
94
|
-
|
|
64
|
+
本節概述了可用的語言以及如何啟用它們。有關翻譯工作流程的完整指南,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
|
|
@@ -1,94 +1,64 @@
|
|
|
1
1
|
# 语言支持
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
direction: down
|
|
9
|
-
|
|
10
|
-
Source-Doc: {
|
|
11
|
-
label: "源文档\n(例如,英语)"
|
|
12
|
-
shape: rectangle
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
AI-Engine: {
|
|
16
|
-
label: "AIGNE DocSmith\nAI 翻译引擎"
|
|
17
|
-
shape: rectangle
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
Translated-Docs: {
|
|
21
|
-
label: "翻译后的文档"
|
|
22
|
-
shape: rectangle
|
|
23
|
-
grid-columns: 3
|
|
24
|
-
|
|
25
|
-
zh: "简体中文"
|
|
26
|
-
ja: "日本語"
|
|
27
|
-
es: "Español"
|
|
28
|
-
fr: "Français"
|
|
29
|
-
de: "Deutsch"
|
|
30
|
-
more: "..."
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
Source-Doc -> AI-Engine: "`aigne doc translate`"
|
|
34
|
-
AI-Engine -> Translated-Docs: "生成"
|
|
35
|
-
```
|
|
3
|
+
AIGNE DocSmith 提供 12 种语言的自动化文档翻译,使您能够为全球受众生成和维护本地化内容。该功能主要通过 `aigne doc translate` 命令进行管理。
|
|
4
|
+
|
|
5
|
+
翻译工作流使用 AI 引擎处理您的源文档,并生成您所选目标语言的版本。`aigne doc translate` 命令提供了一个交互式界面,引导您选择要翻译的文档和语言。
|
|
6
|
+
|
|
7
|
+

|
|
36
8
|
|
|
37
9
|
## 支持的语言
|
|
38
10
|
|
|
39
|
-
DocSmith
|
|
40
|
-
|
|
41
|
-
| 语言 | 语言代码 |
|
|
42
|
-
|
|
43
|
-
|
|
|
44
|
-
| 简体中文 | `zh` |
|
|
45
|
-
| 繁體中文 | `zh-TW` |
|
|
46
|
-
| 日本語 | `ja` |
|
|
47
|
-
| 한국어 | `ko` |
|
|
48
|
-
| Español | `es` |
|
|
49
|
-
| Français | `fr` |
|
|
50
|
-
| Deutsch | `de` |
|
|
51
|
-
| Português | `pt` |
|
|
52
|
-
| Русский | `ru` |
|
|
53
|
-
| Italiano | `it` |
|
|
54
|
-
| العربية | `ar` |
|
|
11
|
+
DocSmith 支持以下语言的 AI 翻译。您可以在使用 `aigne doc init` 进行初始设置时定义项目的主要语言,并可以选择以下任意数量的语言进行翻译。
|
|
12
|
+
|
|
13
|
+
| 语言 | 语言代码 |
|
|
14
|
+
|---|---|
|
|
15
|
+
| English | `en` |
|
|
16
|
+
| 简体中文 | `zh` |
|
|
17
|
+
| 繁體中文 | `zh-TW` |
|
|
18
|
+
| 日本語 | `ja` |
|
|
19
|
+
| 한국어 | `ko` |
|
|
20
|
+
| Español | `es` |
|
|
21
|
+
| Français | `fr` |
|
|
22
|
+
| Deutsch | `de` |
|
|
23
|
+
| Português | `pt` |
|
|
24
|
+
| Русский | `ru` |
|
|
25
|
+
| Italiano | `it` |
|
|
26
|
+
| العربية | `ar` |
|
|
55
27
|
|
|
56
28
|
## 如何配置和使用翻译
|
|
57
29
|
|
|
58
|
-
|
|
30
|
+
语言设置在您初始化项目时进行配置。您可以随时使用 `aigne doc translate` 命令添加新语言或翻译现有文档,该命令支持两种操作模式。
|
|
59
31
|
|
|
60
32
|
### 用于引导式翻译的交互模式
|
|
61
33
|
|
|
62
|
-
|
|
34
|
+
如需分步引导流程,请运行不带任何参数的命令。建议大多数用户使用此方法。
|
|
63
35
|
|
|
64
36
|
```bash 交互式翻译 icon=lucide:wand
|
|
65
37
|
aigne doc translate
|
|
66
38
|
```
|
|
67
39
|
|
|
68
|
-
|
|
40
|
+
交互模式会显示一系列提示,允许您选择要翻译的文档并从列表中选择目标语言。如果项目中尚未包含某些翻译语言,此模式也允许您将其添加到项目配置中。
|
|
69
41
|
|
|
70
|
-
|
|
71
|
-
2. 从支持的语言列表中选择一个或多个目标语言。
|
|
72
|
-
3. 如果项目中尚未包含新的翻译语言,则将其添加到项目配置中。
|
|
42
|
+

|
|
73
43
|
|
|
74
44
|
### 用于自动化的命令行参数
|
|
75
45
|
|
|
76
|
-
|
|
46
|
+
为了直接控制或在自动化脚本中使用,您可以将文档和语言指定为命令行参数。此方法适用于集成到 CI/CD 管道中。
|
|
77
47
|
|
|
78
48
|
```bash 命令示例 icon=lucide:terminal
|
|
79
49
|
# 将 overview.md 和 examples.md 翻译成中文和日文
|
|
80
50
|
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
81
51
|
```
|
|
82
52
|
|
|
83
|
-
|
|
53
|
+
下表详细介绍了 `translate` 命令的关键参数:
|
|
84
54
|
|
|
85
55
|
| 参数 | 描述 |
|
|
86
56
|
|---|---|
|
|
87
|
-
| `--langs` |
|
|
88
|
-
| `--docs` |
|
|
89
|
-
| `--feedback` |
|
|
90
|
-
| `--glossary` |
|
|
57
|
+
| `--langs` | 指定目标语言代码。该标志可以多次使用以选择多种语言。 |
|
|
58
|
+
| `--docs` | 指定要翻译的文档路径(例如 `overview.md`)。该标志也可以多次使用。 |
|
|
59
|
+
| `--feedback` | 提供具体指令以指导翻译模型(例如 `"使用正式语气"`)。 |
|
|
60
|
+
| `--glossary` | 使用自定义术语表文件(例如 `@path/to/glossary.md`)来确保项目特定术语的翻译一致性。 |
|
|
91
61
|
|
|
92
62
|
---
|
|
93
63
|
|
|
94
|
-
|
|
64
|
+
本节概述了可用的语言以及如何启用它们。有关翻译工作流的完整指南,请参阅 [翻译文档](./features-translate-documentation.md) 指南。
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
# LLMセットアップ
|
|
1
|
+
# LLM セットアップ
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith
|
|
3
|
+
AIGNE DocSmith は、大規模言語モデル (LLM) を使用してドキュメンテーションコンテンツを生成します。AI モデルプロバイダーの設定は、主に 2 つの方法で行うことができます。統合された AIGNE Hub を利用する方法、またはお好みのプロバイダーから独自のカスタム API キーを接続する方法です。
|
|
4
4
|
|
|
5
|
-
## AIGNE Hub
|
|
5
|
+
## AIGNE Hub (推奨)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
LLM を設定する最も直接的な方法は、AIGNE Hub を使用することです。これは複数の LLM プロバイダーへのゲートウェイとして機能し、主に 2 つの利点があります。
|
|
8
8
|
|
|
9
|
-
- **API
|
|
10
|
-
-
|
|
9
|
+
- **API キー不要:** 独自の API キーやサービスサブスクリプションを管理する必要なく、ドキュメントを生成できます。
|
|
10
|
+
- **柔軟なモデル切り替え:** `--model` フラグを使用することで、任意のコマンドの AI モデルを変更できます。
|
|
11
11
|
|
|
12
|
-
AIGNE Hub
|
|
12
|
+
AIGNE Hub を介して特定のモデルを使用するには、コマンドに `--model` フラグを追加します。以下の例でその使用方法を示します。
|
|
13
13
|
|
|
14
|
-
```bash
|
|
15
|
-
#
|
|
16
|
-
aigne doc generate --model
|
|
14
|
+
```bash AIGNE Hub経由で異なるモデルを使用する icon=mdi:code-braces
|
|
15
|
+
# OpenAI の GPT-4o モデルを使用
|
|
16
|
+
aigne doc generate --model openai:gpt-4o
|
|
17
17
|
|
|
18
|
-
# AnthropicのClaude
|
|
19
|
-
aigne doc generate --model
|
|
18
|
+
# Anthropic の Claude 4.5 Sonnet モデルを使用
|
|
19
|
+
aigne doc generate --model anthropic:claude-sonnet-4-5
|
|
20
20
|
|
|
21
|
-
#
|
|
22
|
-
aigne doc generate --model
|
|
21
|
+
# Google の Gemini 2.5 Pro モデルを使用
|
|
22
|
+
aigne doc generate --model google:gemini-2.5-pro
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
`--model` フラグが指定されていない場合、DocSmith はプロジェクトの設定ファイルで定義されたモデルをデフォルトで使用します。
|
|
26
26
|
|
|
27
|
-
## カスタムAPIキーの使用
|
|
27
|
+
## カスタム API キーの使用
|
|
28
28
|
|
|
29
|
-
OpenAI
|
|
29
|
+
OpenAI、Anthropic、Google などのプロバイダーで独自のアカウントを使用したいユーザーのために、DocSmith は個人の API キーで設定できます。この方法により、API の使用状況と請求を直接管理できます。
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
設定は対話型ウィザードを通じて行われます。起動するには、次のコマンドを実行します。
|
|
32
32
|
|
|
33
|
-
```bash
|
|
33
|
+
```bash 対話型ウィザードの起動 icon=lucide:magic-wand
|
|
34
34
|
aigne doc init
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
ウィザードがプロバイダーの選択と必要な認証情報の入力を求めます。このプロセスの完全なステップバイステップガイドについては、[インタラクティブ設定](./configuration-interactive-setup.md) のドキュメントを参照してください。
|
|
38
38
|
|
|
39
39
|
## デフォルトモデルの設定
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
すべてのドキュメント生成タスクで一貫性を保つため、プロジェクトの `aigne.yaml` 設定ファイルでデフォルトの LLM を設定できます。このモデルは、`--model` フラグを明示的に含まないすべてのコマンドで使用されます。
|
|
42
|
+
|
|
43
|
+
以下は設定例です。
|
|
42
44
|
|
|
43
45
|
```yaml aigne.yaml icon=mdi:file-code
|
|
44
46
|
chat_model:
|
|
@@ -47,8 +49,8 @@ chat_model:
|
|
|
47
49
|
temperature: 0.8
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
この例では、DocSmithはGoogle
|
|
52
|
+
この例では、DocSmith は Google の `gemini-2.5-pro` モデルを `temperature` 設定 `0.8` で、すべての生成タスクのデフォルトとして使用するように設定されています。
|
|
51
53
|
|
|
52
54
|
---
|
|
53
55
|
|
|
54
|
-
LLM
|
|
56
|
+
LLM プロバイダーの設定が完了したら、次のステップはドキュメントの言語設定を管理することです。[言語サポート](./configuration-language-support.md) ガイドに進み、サポートされている言語の全リストを確認し、それらを有効にする方法を学んでください。
|
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
# LLM Setup
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith uses Large Language Models (LLMs) to generate documentation content.
|
|
3
|
+
AIGNE DocSmith uses Large Language Models (LLMs) to generate documentation content. Configuration of the AI model provider can be accomplished through two primary methods: utilizing the integrated AIGNE Hub or connecting your own custom API keys from a provider of your choice.
|
|
4
4
|
|
|
5
5
|
## AIGNE Hub (Recommended)
|
|
6
6
|
|
|
7
|
-
The most direct
|
|
7
|
+
The most direct method for configuring the LLM is through AIGNE Hub. It functions as a gateway to multiple LLM providers, offering two main benefits:
|
|
8
8
|
|
|
9
|
-
- **No API Key Required:** You can generate documents without
|
|
10
|
-
- **
|
|
9
|
+
- **No API Key Required:** You can generate documents without the need to manage your own API keys or service subscriptions.
|
|
10
|
+
- **Flexible Model Switching:** You can change the AI model for any command by using the `--model` flag.
|
|
11
11
|
|
|
12
|
-
To use a specific model through AIGNE Hub,
|
|
12
|
+
To use a specific model through AIGNE Hub, append the `--model` flag to your command. The following examples demonstrate its usage:
|
|
13
13
|
|
|
14
14
|
```bash Using Different Models via AIGNE Hub icon=mdi:code-braces
|
|
15
|
-
# Use Google's Gemini 2.5 Flash model
|
|
16
|
-
aigne doc generate --model google:gemini-2.5-flash
|
|
17
|
-
|
|
18
|
-
# Use Anthropic's Claude 3.5 Sonnet model
|
|
19
|
-
aigne doc generate --model claude:claude-3-5-sonnet
|
|
20
|
-
|
|
21
15
|
# Use OpenAI's GPT-4o model
|
|
22
16
|
aigne doc generate --model openai:gpt-4o
|
|
17
|
+
|
|
18
|
+
# Use Anthropic's Claude 4.5 Sonnet model
|
|
19
|
+
aigne doc generate --model anthropic:claude-sonnet-4-5
|
|
20
|
+
|
|
21
|
+
# Use Google's Gemini 2.5 Pro model
|
|
22
|
+
aigne doc generate --model google:gemini-2.5-pro
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
If
|
|
25
|
+
If the `--model` flag is not specified, DocSmith will default to the model defined in your project's configuration file.
|
|
26
26
|
|
|
27
27
|
## Using Custom API Keys
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
For users who prefer to use their own accounts with providers such as OpenAI, Anthropic, or Google, DocSmith can be configured with personal API keys. This method provides direct control over API usage and billing.
|
|
30
30
|
|
|
31
31
|
Configuration is handled through an interactive wizard. To launch it, run the following command:
|
|
32
32
|
|
|
33
|
-
```bash
|
|
33
|
+
```bash Launching the Interactive Wizard icon=lucide:magic-wand
|
|
34
34
|
aigne doc init
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
The wizard will prompt you to select your provider and enter
|
|
37
|
+
The wizard will prompt you to select your provider and enter the necessary credentials. For a complete, step-by-step guide on this process, refer to the [Interactive Setup](./configuration-interactive-setup.md) documentation.
|
|
38
38
|
|
|
39
39
|
## Setting a Default Model
|
|
40
40
|
|
|
41
|
-
To maintain consistency across all documentation generation tasks,
|
|
41
|
+
To maintain consistency across all documentation generation tasks, a default LLM can be set in your project's `aigne.yaml` configuration file. This model will be used for any command that does not explicitly include the `--model` flag.
|
|
42
|
+
|
|
43
|
+
The following is an example configuration:
|
|
42
44
|
|
|
43
45
|
```yaml aigne.yaml icon=mdi:file-code
|
|
44
46
|
chat_model:
|
|
@@ -47,8 +49,8 @@ chat_model:
|
|
|
47
49
|
temperature: 0.8
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
In this example, DocSmith is configured to use Google's `gemini-2.5-pro` model with a `temperature` setting of `0.8`
|
|
52
|
+
In this example, DocSmith is configured to use Google's `gemini-2.5-pro` model with a `temperature` setting of `0.8` as the default for all generation tasks.
|
|
51
53
|
|
|
52
54
|
---
|
|
53
55
|
|
|
54
|
-
With
|
|
56
|
+
With the LLM provider configured, the next step is to manage language settings for your documentation. Proceed to the [Language Support](./configuration-language-support.md) guide to see the full list of supported languages and learn how to enable them.
|
|
@@ -1,44 +1,46 @@
|
|
|
1
1
|
# LLM 設定
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith 使用大型語言模型 (LLM)
|
|
3
|
+
AIGNE DocSmith 使用大型語言模型 (LLM) 來產生文件內容。AI 模型提供者的設定可以透過兩種主要方式完成:使用整合的 AIGNE Hub 或連接您自己選擇的提供者的自訂 API 金鑰。
|
|
4
4
|
|
|
5
5
|
## AIGNE Hub (推薦)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
設定 LLM 最直接的方法是透過 AIGNE Hub。它作為多個 LLM 提供者的閘道,提供兩大好處:
|
|
8
8
|
|
|
9
|
-
- **無需 API 金鑰:**
|
|
10
|
-
-
|
|
9
|
+
- **無需 API 金鑰:** 您可以產生文件,而無需管理自己的 API 金鑰或服務訂閱。
|
|
10
|
+
- **靈活的模型切換:** 您可以使用 `--model` 旗標為任何指令變更 AI 模型。
|
|
11
11
|
|
|
12
|
-
若要透過 AIGNE Hub
|
|
13
|
-
|
|
14
|
-
```bash 使用不同模型透過 AIGNE Hub icon=mdi:code-braces
|
|
15
|
-
# 使用 Google 的 Gemini 2.5 Flash 模型
|
|
16
|
-
aigne doc generate --model google:gemini-2.5-flash
|
|
17
|
-
|
|
18
|
-
# 使用 Anthropic 的 Claude 3.5 Sonnet 模型
|
|
19
|
-
aigne doc generate --model claude:claude-3-5-sonnet
|
|
12
|
+
若要透過 AIGNE Hub 使用特定模型,請在您的指令後加上 `--model` 旗標。以下範例展示了其用法:
|
|
20
13
|
|
|
14
|
+
```bash 透過 AIGNE Hub 使用不同模型 icon=mdi:code-braces
|
|
21
15
|
# 使用 OpenAI 的 GPT-4o 模型
|
|
22
16
|
aigne doc generate --model openai:gpt-4o
|
|
17
|
+
|
|
18
|
+
# 使用 Anthropic 的 Claude 4.5 Sonnet 模型
|
|
19
|
+
aigne doc generate --model anthropic:claude-sonnet-4-5
|
|
20
|
+
|
|
21
|
+
# 使用 Google 的 Gemini 2.5 Pro 模型
|
|
22
|
+
aigne doc generate --model google:gemini-2.5-pro
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
如果未指定 `--model` 旗標,DocSmith 將預設使用您專案設定檔中定義的模型。
|
|
26
26
|
|
|
27
27
|
## 使用自訂 API 金鑰
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
對於偏好使用自己在 OpenAI、Anthropic 或 Google 等提供者帳戶的使用者,DocSmith 可以設定個人 API 金鑰。此方法可直接控制 API 的使用和計費。
|
|
30
30
|
|
|
31
31
|
設定是透過互動式精靈處理的。若要啟動它,請執行以下指令:
|
|
32
32
|
|
|
33
|
-
```bash
|
|
33
|
+
```bash 啟動互動式精靈 icon=lucide:magic-wand
|
|
34
34
|
aigne doc init
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
精靈會提示您選擇您的提供者並輸入必要的憑證。有關此過程的完整逐步指南,請參閱 [互動式設定](./configuration-interactive-setup.md) 文件。
|
|
38
38
|
|
|
39
39
|
## 設定預設模型
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
為維持所有文件產生任務的一致性,可以在您專案的 `aigne.yaml` 設定檔中設定預設的 LLM。此模型將用於任何未明確包含 `--model` 旗標的指令。
|
|
42
|
+
|
|
43
|
+
以下是範例設定:
|
|
42
44
|
|
|
43
45
|
```yaml aigne.yaml icon=mdi:file-code
|
|
44
46
|
chat_model:
|
|
@@ -47,8 +49,8 @@ chat_model:
|
|
|
47
49
|
temperature: 0.8
|
|
48
50
|
```
|
|
49
51
|
|
|
50
|
-
在此範例中,DocSmith
|
|
52
|
+
在此範例中,DocSmith 設定為使用 Google 的 `gemini-2.5-pro` 模型,並將 `temperature` 設定為 `0.8`,作為所有產生任務的預設值。
|
|
51
53
|
|
|
52
54
|
---
|
|
53
55
|
|
|
54
|
-
|
|
56
|
+
設定好 LLM 提供者後,下一步是管理您文件的語言設定。請前往 [語言支援](./configuration-language-support.md) 指南,查看支援的語言完整列表並了解如何啟用它們。
|