@aigne/doc-smith 0.8.12-beta.2 → 0.8.12-beta.4
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 +9 -6
- package/.aigne/doc-smith/output/structure-plan.json +123 -109
- package/.aigne/doc-smith/upload-cache.yaml +48 -0
- package/.github/workflows/publish-docs.yml +4 -7
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/agents/clear/choose-contents.mjs +22 -5
- package/agents/clear/clear-auth-tokens.mjs +2 -4
- package/agents/clear/clear-deployment-config.mjs +49 -0
- package/agents/clear/clear-document-config.mjs +2 -5
- package/agents/clear/clear-document-structure.mjs +2 -6
- package/agents/clear/clear-generated-docs.mjs +0 -1
- package/agents/generate/check-need-generate-structure.mjs +15 -60
- package/agents/generate/document-structure-tools/generate-sub-structure.mjs +131 -0
- package/agents/generate/generate-structure-without-tools.yaml +65 -0
- package/agents/generate/generate-structure.yaml +7 -1
- package/agents/generate/index.yaml +0 -3
- package/agents/generate/update-document-structure.yaml +3 -0
- package/agents/generate/user-review-document-structure.mjs +7 -5
- package/agents/init/index.mjs +15 -15
- package/agents/publish/publish-docs.mjs +132 -113
- package/agents/translate/index.yaml +1 -1
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/batch-update-document.yaml +1 -1
- package/agents/update/check-document.mjs +3 -19
- package/agents/update/user-review-document.mjs +4 -3
- package/agents/utils/load-sources.mjs +54 -151
- package/agents/utils/transform-detail-datasources.mjs +14 -18
- package/aigne.yaml +2 -0
- package/biome.json +1 -1
- package/docs/_sidebar.md +13 -15
- package/docs/configuration-initial-setup.ja.md +179 -0
- package/docs/configuration-initial-setup.md +179 -0
- package/docs/configuration-initial-setup.zh-TW.md +179 -0
- package/docs/configuration-initial-setup.zh.md +179 -0
- package/docs/configuration-managing-preferences.ja.md +100 -0
- package/docs/configuration-managing-preferences.md +100 -0
- package/docs/configuration-managing-preferences.zh-TW.md +100 -0
- package/docs/configuration-managing-preferences.zh.md +100 -0
- package/docs/configuration.ja.md +68 -184
- package/docs/configuration.md +62 -178
- package/docs/configuration.zh-TW.md +70 -186
- package/docs/configuration.zh.md +67 -183
- package/docs/getting-started.ja.md +46 -78
- package/docs/getting-started.md +46 -78
- package/docs/getting-started.zh-TW.md +47 -79
- package/docs/getting-started.zh.md +47 -79
- package/docs/guides-cleaning-up.ja.md +50 -0
- package/docs/guides-cleaning-up.md +50 -0
- package/docs/guides-cleaning-up.zh-TW.md +50 -0
- package/docs/guides-cleaning-up.zh.md +50 -0
- package/docs/guides-evaluating-documents.ja.md +66 -0
- package/docs/guides-evaluating-documents.md +66 -0
- package/docs/guides-evaluating-documents.zh-TW.md +66 -0
- package/docs/guides-evaluating-documents.zh.md +66 -0
- package/docs/guides-generating-documentation.ja.md +149 -0
- package/docs/guides-generating-documentation.md +149 -0
- package/docs/guides-generating-documentation.zh-TW.md +149 -0
- package/docs/guides-generating-documentation.zh.md +149 -0
- package/docs/guides-interactive-chat.ja.md +85 -0
- package/docs/guides-interactive-chat.md +85 -0
- package/docs/guides-interactive-chat.zh-TW.md +85 -0
- package/docs/guides-interactive-chat.zh.md +85 -0
- package/docs/guides-managing-history.ja.md +51 -0
- package/docs/guides-managing-history.md +51 -0
- package/docs/guides-managing-history.zh-TW.md +51 -0
- package/docs/guides-managing-history.zh.md +51 -0
- package/docs/guides-publishing-your-docs.ja.md +78 -0
- package/docs/guides-publishing-your-docs.md +78 -0
- package/docs/guides-publishing-your-docs.zh-TW.md +78 -0
- package/docs/guides-publishing-your-docs.zh.md +78 -0
- package/docs/guides-translating-documentation.ja.md +95 -0
- package/docs/guides-translating-documentation.md +95 -0
- package/docs/guides-translating-documentation.zh-TW.md +95 -0
- package/docs/guides-translating-documentation.zh.md +95 -0
- package/docs/guides-updating-documentation.ja.md +77 -0
- package/docs/guides-updating-documentation.md +77 -0
- package/docs/guides-updating-documentation.zh-TW.md +77 -0
- package/docs/guides-updating-documentation.zh.md +77 -0
- package/docs/guides.ja.md +32 -0
- package/docs/guides.md +32 -0
- package/docs/guides.zh-TW.md +32 -0
- package/docs/guides.zh.md +32 -0
- package/docs/overview.ja.md +39 -60
- package/docs/overview.md +39 -60
- package/docs/overview.zh-TW.md +39 -60
- package/docs/overview.zh.md +39 -60
- package/docs/release-notes.ja.md +255 -0
- package/docs/release-notes.md +255 -0
- package/docs/release-notes.zh-TW.md +255 -0
- package/docs/release-notes.zh.md +255 -0
- package/package.json +4 -2
- package/prompts/common/document/content-rules-core.md +1 -0
- package/prompts/common/document-structure/document-structure-rules.md +8 -9
- package/prompts/common/document-structure/output-constraints.md +1 -1
- package/prompts/structure/document-rules.md +8 -2
- package/prompts/structure/generate/system-prompt.md +27 -2
- package/prompts/structure/generate/user-prompt.md +18 -0
- package/prompts/structure/update/system-prompt.md +12 -0
- package/prompts/structure/update/user-prompt.md +3 -0
- package/tests/agents/clear/choose-contents.test.mjs +8 -4
- package/tests/agents/generate/check-need-generate-structure.test.mjs +53 -63
- package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +277 -0
- package/tests/agents/init/init.test.mjs +18 -18
- package/tests/agents/publish/publish-docs.test.mjs +79 -0
- package/tests/agents/update/check-document.test.mjs +7 -67
- package/tests/agents/utils/load-sources.test.mjs +90 -90
- package/tests/agents/utils/transform-detail-datasources.test.mjs +153 -196
- package/tests/utils/file-utils.test.mjs +309 -1
- package/utils/auth-utils.mjs +12 -5
- package/utils/constants/index.mjs +5 -2
- package/utils/deploy.mjs +2 -2
- package/utils/file-utils.mjs +315 -0
- package/utils/utils.mjs +89 -50
- package/docs/advanced-how-it-works.ja.md +0 -101
- package/docs/advanced-how-it-works.md +0 -101
- package/docs/advanced-how-it-works.zh-TW.md +0 -101
- package/docs/advanced-how-it-works.zh.md +0 -101
- package/docs/advanced-quality-assurance.ja.md +0 -92
- package/docs/advanced-quality-assurance.md +0 -92
- package/docs/advanced-quality-assurance.zh-TW.md +0 -92
- package/docs/advanced-quality-assurance.zh.md +0 -92
- package/docs/advanced.ja.md +0 -20
- package/docs/advanced.md +0 -20
- package/docs/advanced.zh-TW.md +0 -20
- package/docs/advanced.zh.md +0 -20
- package/docs/changelog.ja.md +0 -486
- package/docs/changelog.md +0 -486
- package/docs/changelog.zh-TW.md +0 -486
- package/docs/changelog.zh.md +0 -486
- package/docs/cli-reference.ja.md +0 -311
- package/docs/cli-reference.md +0 -311
- package/docs/cli-reference.zh-TW.md +0 -311
- package/docs/cli-reference.zh.md +0 -311
- package/docs/configuration-interactive-setup.ja.md +0 -138
- package/docs/configuration-interactive-setup.md +0 -138
- package/docs/configuration-interactive-setup.zh-TW.md +0 -138
- package/docs/configuration-interactive-setup.zh.md +0 -138
- package/docs/configuration-language-support.ja.md +0 -64
- package/docs/configuration-language-support.md +0 -64
- package/docs/configuration-language-support.zh-TW.md +0 -64
- package/docs/configuration-language-support.zh.md +0 -64
- package/docs/configuration-llm-setup.ja.md +0 -56
- package/docs/configuration-llm-setup.md +0 -56
- package/docs/configuration-llm-setup.zh-TW.md +0 -56
- package/docs/configuration-llm-setup.zh.md +0 -56
- package/docs/configuration-preferences.ja.md +0 -144
- package/docs/configuration-preferences.md +0 -144
- package/docs/configuration-preferences.zh-TW.md +0 -144
- package/docs/configuration-preferences.zh.md +0 -144
- package/docs/features-generate-documentation.ja.md +0 -95
- package/docs/features-generate-documentation.md +0 -95
- package/docs/features-generate-documentation.zh-TW.md +0 -95
- package/docs/features-generate-documentation.zh.md +0 -95
- package/docs/features-publish-your-docs.ja.md +0 -130
- package/docs/features-publish-your-docs.md +0 -130
- package/docs/features-publish-your-docs.zh-TW.md +0 -130
- package/docs/features-publish-your-docs.zh.md +0 -130
- package/docs/features-translate-documentation.ja.md +0 -90
- package/docs/features-translate-documentation.md +0 -90
- package/docs/features-translate-documentation.zh-TW.md +0 -90
- package/docs/features-translate-documentation.zh.md +0 -90
- package/docs/features-update-and-refine.ja.md +0 -142
- package/docs/features-update-and-refine.md +0 -142
- package/docs/features-update-and-refine.zh-TW.md +0 -143
- package/docs/features-update-and-refine.zh.md +0 -142
- package/docs/features.ja.md +0 -62
- package/docs/features.md +0 -62
- package/docs/features.zh-TW.md +0 -62
- package/docs/features.zh.md +0 -62
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Language Support
|
|
2
|
-
|
|
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
|
-

|
|
8
|
-
|
|
9
|
-
## Supported Languages
|
|
10
|
-
|
|
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` |
|
|
27
|
-
|
|
28
|
-
## How to Configure and Use Translation
|
|
29
|
-
|
|
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.
|
|
31
|
-
|
|
32
|
-
### Interactive Mode for Guided Translation
|
|
33
|
-
|
|
34
|
-
For a step-by-step guided process, run the command without any arguments. This method is recommended for most users.
|
|
35
|
-
|
|
36
|
-
```bash Interactive Translation icon=lucide:wand
|
|
37
|
-
aigne doc translate
|
|
38
|
-
```
|
|
39
|
-
|
|
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.
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
### Command-Line Arguments for Automation
|
|
45
|
-
|
|
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.
|
|
47
|
-
|
|
48
|
-
```bash Command Example icon=lucide:terminal
|
|
49
|
-
# Translate overview.md and examples.md into Chinese and Japanese
|
|
50
|
-
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
The following table details the key parameters for the `translate` command:
|
|
54
|
-
|
|
55
|
-
| Parameter | Description |
|
|
56
|
-
|---|---|
|
|
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. |
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
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,64 +0,0 @@
|
|
|
1
|
-
# 語言支援
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith 提供 12 種語言的自動化文件翻譯功能,讓您能夠為全球受眾產生並維護本地化內容。此功能主要透過 `aigne doc translate` 命令進行管理。
|
|
4
|
-
|
|
5
|
-
翻譯工作流程使用 AI 引擎處理您的來源文件,並產生您所選目標語言的版本。`aigne doc translate` 命令提供一個互動式介面,引導您選擇要翻譯的文件和語言。
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
## 支援的語言
|
|
10
|
-
|
|
11
|
-
DocSmith 支援以下語言的 AI 翻譯。您可以在使用 `aigne doc init` 進行初始設定時定義專案的主要語言,並可選擇以下任何數量的語言進行翻譯。
|
|
12
|
-
|
|
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` 命令新增語言或翻譯現有文件,該命令支援兩種操作模式。
|
|
31
|
-
|
|
32
|
-
### 用於引導式翻譯的互動模式
|
|
33
|
-
|
|
34
|
-
若要進行逐步引導的流程,請執行不含任何參數的命令。建議大多數使用者使用此方法。
|
|
35
|
-
|
|
36
|
-
```bash 互動式翻譯 icon=lucide:wand
|
|
37
|
-
aigne doc translate
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
互動模式會顯示一系列提示,讓您能夠選擇要翻譯的文件,並從清單中選擇您的目標語言。如果專案設定中尚未包含新的翻譯語言,此模式也允許您新增。
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
### 用於自動化的命令列參數
|
|
45
|
-
|
|
46
|
-
為了直接控制或在自動化腳本中使用,您可以將文件和語言指定為命令列參數。此方法適合整合到 CI/CD 管線中。
|
|
47
|
-
|
|
48
|
-
```bash 命令範例 icon=lucide:terminal
|
|
49
|
-
# 將 overview.md 和 examples.md 翻譯成中文和日文
|
|
50
|
-
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
下表詳細說明了 `translate` 命令的主要參數:
|
|
54
|
-
|
|
55
|
-
| 參數 | 說明 |
|
|
56
|
-
|---|---|
|
|
57
|
-
| `--langs` | 指定目標語言代碼。此旗標可多次使用以選擇多種語言。 |
|
|
58
|
-
| `--docs` | 指定要翻譯的文件的路徑(例如 `overview.md`)。此旗標也可多次使用。 |
|
|
59
|
-
| `--feedback` | 提供具體指令以引導翻譯模型(例如 `「使用正式語氣」`)。 |
|
|
60
|
-
| `--glossary` | 使用自訂詞彙表檔案(例如 `@path/to/glossary.md`)以確保專案特定術語的翻譯一致性。 |
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
本節概述了可用的語言以及如何啟用它們。有關翻譯工作流程的完整指南,請參閱 [翻譯文件](./features-translate-documentation.md) 指南。
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# 语言支持
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith 提供 12 种语言的自动化文档翻译,使您能够为全球受众生成和维护本地化内容。该功能主要通过 `aigne doc translate` 命令进行管理。
|
|
4
|
-
|
|
5
|
-
翻译工作流使用 AI 引擎处理您的源文档,并生成您所选目标语言的版本。`aigne doc translate` 命令提供了一个交互式界面,引导您选择要翻译的文档和语言。
|
|
6
|
-
|
|
7
|
-

|
|
8
|
-
|
|
9
|
-
## 支持的语言
|
|
10
|
-
|
|
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` |
|
|
27
|
-
|
|
28
|
-
## 如何配置和使用翻译
|
|
29
|
-
|
|
30
|
-
语言设置在您初始化项目时进行配置。您可以随时使用 `aigne doc translate` 命令添加新语言或翻译现有文档,该命令支持两种操作模式。
|
|
31
|
-
|
|
32
|
-
### 用于引导式翻译的交互模式
|
|
33
|
-
|
|
34
|
-
如需分步引导流程,请运行不带任何参数的命令。建议大多数用户使用此方法。
|
|
35
|
-
|
|
36
|
-
```bash 交互式翻译 icon=lucide:wand
|
|
37
|
-
aigne doc translate
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
交互模式会显示一系列提示,允许您选择要翻译的文档并从列表中选择目标语言。如果项目中尚未包含某些翻译语言,此模式也允许您将其添加到项目配置中。
|
|
41
|
-
|
|
42
|
-

|
|
43
|
-
|
|
44
|
-
### 用于自动化的命令行参数
|
|
45
|
-
|
|
46
|
-
为了直接控制或在自动化脚本中使用,您可以将文档和语言指定为命令行参数。此方法适用于集成到 CI/CD 管道中。
|
|
47
|
-
|
|
48
|
-
```bash 命令示例 icon=lucide:terminal
|
|
49
|
-
# 将 overview.md 和 examples.md 翻译成中文和日文
|
|
50
|
-
aigne doc translate --langs zh --langs ja --docs overview.md --docs examples.md
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
下表详细介绍了 `translate` 命令的关键参数:
|
|
54
|
-
|
|
55
|
-
| 参数 | 描述 |
|
|
56
|
-
|---|---|
|
|
57
|
-
| `--langs` | 指定目标语言代码。该标志可以多次使用以选择多种语言。 |
|
|
58
|
-
| `--docs` | 指定要翻译的文档路径(例如 `overview.md`)。该标志也可以多次使用。 |
|
|
59
|
-
| `--feedback` | 提供具体指令以指导翻译模型(例如 `"使用正式语气"`)。 |
|
|
60
|
-
| `--glossary` | 使用自定义术语表文件(例如 `@path/to/glossary.md`)来确保项目特定术语的翻译一致性。 |
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
本节概述了可用的语言以及如何启用它们。有关翻译工作流的完整指南,请参阅 [翻译文档](./features-translate-documentation.md) 指南。
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# LLM セットアップ
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith は、大規模言語モデル (LLM) を使用してドキュメンテーションコンテンツを生成します。AI モデルプロバイダーの設定は、主に 2 つの方法で行うことができます。統合された AIGNE Hub を利用する方法、またはお好みのプロバイダーから独自のカスタム API キーを接続する方法です。
|
|
4
|
-
|
|
5
|
-
## AIGNE Hub (推奨)
|
|
6
|
-
|
|
7
|
-
LLM を設定する最も直接的な方法は、AIGNE Hub を使用することです。これは複数の LLM プロバイダーへのゲートウェイとして機能し、主に 2 つの利点があります。
|
|
8
|
-
|
|
9
|
-
- **API キー不要:** 独自の API キーやサービスサブスクリプションを管理する必要なく、ドキュメントを生成できます。
|
|
10
|
-
- **柔軟なモデル切り替え:** `--model` フラグを使用することで、任意のコマンドの AI モデルを変更できます。
|
|
11
|
-
|
|
12
|
-
AIGNE Hub を介して特定のモデルを使用するには、コマンドに `--model` フラグを追加します。以下の例でその使用方法を示します。
|
|
13
|
-
|
|
14
|
-
```bash AIGNE Hub経由で異なるモデルを使用する icon=mdi:code-braces
|
|
15
|
-
# OpenAI の GPT-4o モデルを使用
|
|
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
|
-
```
|
|
24
|
-
|
|
25
|
-
`--model` フラグが指定されていない場合、DocSmith はプロジェクトの設定ファイルで定義されたモデルをデフォルトで使用します。
|
|
26
|
-
|
|
27
|
-
## カスタム API キーの使用
|
|
28
|
-
|
|
29
|
-
OpenAI、Anthropic、Google などのプロバイダーで独自のアカウントを使用したいユーザーのために、DocSmith は個人の API キーで設定できます。この方法により、API の使用状況と請求を直接管理できます。
|
|
30
|
-
|
|
31
|
-
設定は対話型ウィザードを通じて行われます。起動するには、次のコマンドを実行します。
|
|
32
|
-
|
|
33
|
-
```bash 対話型ウィザードの起動 icon=lucide:magic-wand
|
|
34
|
-
aigne doc init
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
ウィザードがプロバイダーの選択と必要な認証情報の入力を求めます。このプロセスの完全なステップバイステップガイドについては、[インタラクティブ設定](./configuration-interactive-setup.md) のドキュメントを参照してください。
|
|
38
|
-
|
|
39
|
-
## デフォルトモデルの設定
|
|
40
|
-
|
|
41
|
-
すべてのドキュメント生成タスクで一貫性を保つため、プロジェクトの `aigne.yaml` 設定ファイルでデフォルトの LLM を設定できます。このモデルは、`--model` フラグを明示的に含まないすべてのコマンドで使用されます。
|
|
42
|
-
|
|
43
|
-
以下は設定例です。
|
|
44
|
-
|
|
45
|
-
```yaml aigne.yaml icon=mdi:file-code
|
|
46
|
-
chat_model:
|
|
47
|
-
provider: google
|
|
48
|
-
name: gemini-2.5-pro
|
|
49
|
-
temperature: 0.8
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
この例では、DocSmith は Google の `gemini-2.5-pro` モデルを `temperature` 設定 `0.8` で、すべての生成タスクのデフォルトとして使用するように設定されています。
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
LLM プロバイダーの設定が完了したら、次のステップはドキュメントの言語設定を管理することです。[言語サポート](./configuration-language-support.md) ガイドに進み、サポートされている言語の全リストを確認し、それらを有効にする方法を学んでください。
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# LLM Setup
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
## AIGNE Hub (Recommended)
|
|
6
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
To use a specific model through AIGNE Hub, append the `--model` flag to your command. The following examples demonstrate its usage:
|
|
13
|
-
|
|
14
|
-
```bash Using Different Models via AIGNE Hub icon=mdi:code-braces
|
|
15
|
-
# Use OpenAI's GPT-4o model
|
|
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
|
-
```
|
|
24
|
-
|
|
25
|
-
If the `--model` flag is not specified, DocSmith will default to the model defined in your project's configuration file.
|
|
26
|
-
|
|
27
|
-
## Using Custom API Keys
|
|
28
|
-
|
|
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
|
-
|
|
31
|
-
Configuration is handled through an interactive wizard. To launch it, run the following command:
|
|
32
|
-
|
|
33
|
-
```bash Launching the Interactive Wizard icon=lucide:magic-wand
|
|
34
|
-
aigne doc init
|
|
35
|
-
```
|
|
36
|
-
|
|
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
|
-
|
|
39
|
-
## Setting a Default Model
|
|
40
|
-
|
|
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:
|
|
44
|
-
|
|
45
|
-
```yaml aigne.yaml icon=mdi:file-code
|
|
46
|
-
chat_model:
|
|
47
|
-
provider: google
|
|
48
|
-
name: gemini-2.5-pro
|
|
49
|
-
temperature: 0.8
|
|
50
|
-
```
|
|
51
|
-
|
|
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.
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
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,56 +0,0 @@
|
|
|
1
|
-
# LLM 設定
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith 使用大型語言模型 (LLM) 來產生文件內容。AI 模型提供者的設定可以透過兩種主要方式完成:使用整合的 AIGNE Hub 或連接您自己選擇的提供者的自訂 API 金鑰。
|
|
4
|
-
|
|
5
|
-
## AIGNE Hub (推薦)
|
|
6
|
-
|
|
7
|
-
設定 LLM 最直接的方法是透過 AIGNE Hub。它作為多個 LLM 提供者的閘道,提供兩大好處:
|
|
8
|
-
|
|
9
|
-
- **無需 API 金鑰:** 您可以產生文件,而無需管理自己的 API 金鑰或服務訂閱。
|
|
10
|
-
- **靈活的模型切換:** 您可以使用 `--model` 旗標為任何指令變更 AI 模型。
|
|
11
|
-
|
|
12
|
-
若要透過 AIGNE Hub 使用特定模型,請在您的指令後加上 `--model` 旗標。以下範例展示了其用法:
|
|
13
|
-
|
|
14
|
-
```bash 透過 AIGNE Hub 使用不同模型 icon=mdi:code-braces
|
|
15
|
-
# 使用 OpenAI 的 GPT-4o 模型
|
|
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
|
-
```
|
|
24
|
-
|
|
25
|
-
如果未指定 `--model` 旗標,DocSmith 將預設使用您專案設定檔中定義的模型。
|
|
26
|
-
|
|
27
|
-
## 使用自訂 API 金鑰
|
|
28
|
-
|
|
29
|
-
對於偏好使用自己在 OpenAI、Anthropic 或 Google 等提供者帳戶的使用者,DocSmith 可以設定個人 API 金鑰。此方法可直接控制 API 的使用和計費。
|
|
30
|
-
|
|
31
|
-
設定是透過互動式精靈處理的。若要啟動它,請執行以下指令:
|
|
32
|
-
|
|
33
|
-
```bash 啟動互動式精靈 icon=lucide:magic-wand
|
|
34
|
-
aigne doc init
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
精靈會提示您選擇您的提供者並輸入必要的憑證。有關此過程的完整逐步指南,請參閱 [互動式設定](./configuration-interactive-setup.md) 文件。
|
|
38
|
-
|
|
39
|
-
## 設定預設模型
|
|
40
|
-
|
|
41
|
-
為維持所有文件產生任務的一致性,可以在您專案的 `aigne.yaml` 設定檔中設定預設的 LLM。此模型將用於任何未明確包含 `--model` 旗標的指令。
|
|
42
|
-
|
|
43
|
-
以下是範例設定:
|
|
44
|
-
|
|
45
|
-
```yaml aigne.yaml icon=mdi:file-code
|
|
46
|
-
chat_model:
|
|
47
|
-
provider: google
|
|
48
|
-
name: gemini-2.5-pro
|
|
49
|
-
temperature: 0.8
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
在此範例中,DocSmith 設定為使用 Google 的 `gemini-2.5-pro` 模型,並將 `temperature` 設定為 `0.8`,作為所有產生任務的預設值。
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
設定好 LLM 提供者後,下一步是管理您文件的語言設定。請前往 [語言支援](./configuration-language-support.md) 指南,查看支援的語言完整列表並了解如何啟用它們。
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
# LLM 设置
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith 使用大语言模型 (LLM) 生成文档内容。配置 AI 模型提供商主要有两种方法:利用集成的 AIGNE Hub,或连接您选择的提供商的自定义 API 密钥。
|
|
4
|
-
|
|
5
|
-
## AIGNE Hub (推荐)
|
|
6
|
-
|
|
7
|
-
配置 LLM 最直接的方法是通过 AIGNE Hub。它作为多个 LLM 提供商的网关,提供两大优势:
|
|
8
|
-
|
|
9
|
-
- **无需 API 密钥:** 您无需管理自己的 API 密钥或服务订阅即可生成文档。
|
|
10
|
-
- **灵活切换模型:** 您可以使用 `--model` 标志为任何命令更改 AI 模型。
|
|
11
|
-
|
|
12
|
-
要通过 AIGNE Hub 使用特定模型,请在命令后附加 `--model` 标志。以下示例演示了其用法:
|
|
13
|
-
|
|
14
|
-
```bash 通过 AIGNE Hub 使用不同模型 icon=mdi:code-braces
|
|
15
|
-
# 使用 OpenAI 的 GPT-4o 模型
|
|
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
|
-
```
|
|
24
|
-
|
|
25
|
-
如果未指定 `--model` 标志,DocSmith 将默认使用项目配置文件中定义的模型。
|
|
26
|
-
|
|
27
|
-
## 使用自定义 API 密钥
|
|
28
|
-
|
|
29
|
-
对于希望使用自己在 OpenAI、Anthropic 或 Google 等提供商处的账户的用户,可以使用个人 API 密钥配置 DocSmith。这种方法可以对 API 使用和计费进行直接控制。
|
|
30
|
-
|
|
31
|
-
配置通过交互式向导进行。要启动它,请运行以下命令:
|
|
32
|
-
|
|
33
|
-
```bash 启动交互式向导 icon=lucide:magic-wand
|
|
34
|
-
aigne doc init
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
向导将提示您选择提供商并输入必要的凭据。有关此过程的完整分步指南,请参阅[交互式设置](./configuration-interactive-setup.md)文档。
|
|
38
|
-
|
|
39
|
-
## 设置默认模型
|
|
40
|
-
|
|
41
|
-
为了在所有文档生成任务中保持一致性,可以在项目的 `aigne.yaml` 配置文件中设置默认的 LLM。任何未明确包含 `--model` 标志的命令都将使用此模型。
|
|
42
|
-
|
|
43
|
-
以下是配置示例:
|
|
44
|
-
|
|
45
|
-
```yaml aigne.yaml icon=mdi:file-code
|
|
46
|
-
chat_model:
|
|
47
|
-
provider: google
|
|
48
|
-
name: gemini-2.5-pro
|
|
49
|
-
temperature: 0.8
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
在此示例中,DocSmith 配置为使用 Google 的 `gemini-2.5-pro` 模型,并将 `temperature` 设置为 `0.8` 作为所有生成任务的默认值。
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
配置好 LLM 提供商后,下一步是管理文档的语言设置。请前往[语言支持](./configuration-language-support.md)指南,查看支持的语言完整列表并了解如何启用它们。
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
# プリファレンスの管理
|
|
2
|
-
|
|
3
|
-
AIGNE DocSmith は、フィードバックから学習するように設計されています。生成されたコンテンツを改良または修正すると、DocSmith はそのフィードバックをプリファレンスと呼ばれる永続的なルールに変換できます。これらのルールにより、特定のスタイル、構造要件、コンテンツポリシーが将来のドキュメント作成タスクで一貫して適用されるようになります。すべてのプリファレンスは、プロジェクトルートの `.aigne/doc-smith/preferences.yml` にある人間が読めるYAMLファイルに保存されます。
|
|
4
|
-
|
|
5
|
-
## プリファレンスのライフサイクル
|
|
6
|
-
|
|
7
|
-
次の図は、フィードバックが再利用可能なルールになり、将来のタスクに適用され、コマンドラインから管理される方法を示しています。
|
|
8
|
-
|
|
9
|
-
```d2 プリファレンスのライフサイクル
|
|
10
|
-
direction: down
|
|
11
|
-
|
|
12
|
-
developer: {
|
|
13
|
-
label: "開発者"
|
|
14
|
-
shape: person
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
docsmith_system: {
|
|
18
|
-
label: "AIGNE DocSmith システム"
|
|
19
|
-
shape: rectangle
|
|
20
|
-
|
|
21
|
-
cli: {
|
|
22
|
-
label: "CLI コマンド\n(refine / translate)"
|
|
23
|
-
shape: rectangle
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
agent: {
|
|
27
|
-
label: "内部分析 Agent"
|
|
28
|
-
shape: rectangle
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
decision: {
|
|
32
|
-
label: "フィードバックは\n再利用可能なポリシーか?"
|
|
33
|
-
shape: diamond
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
create_rule: {
|
|
37
|
-
label: "新しいプリファレンスルールを作成"
|
|
38
|
-
shape: rectangle
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
preferences_file: {
|
|
43
|
-
label: ".aigne/doc-smith/preferences.yml"
|
|
44
|
-
shape: cylinder
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
one_time_fix: {
|
|
48
|
-
label: "一度限りの修正として適用"
|
|
49
|
-
shape: oval
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
developer -> docsmith_system.cli: "1. フィードバックを提供"
|
|
53
|
-
docsmith_system.cli -> docsmith_system.agent: "2. フィードバックをキャプチャ"
|
|
54
|
-
docsmith_system.agent -> docsmith_system.decision: "3. 分析"
|
|
55
|
-
docsmith_system.decision -> docsmith_system.create_rule: "はい"
|
|
56
|
-
docsmith_system.create_rule -> preferences_file: "4. ルールをファイルに保存"
|
|
57
|
-
docsmith_system.decision -> one_time_fix: "いいえ"
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### プリファレンスの作成方法
|
|
61
|
-
|
|
62
|
-
`refine` または `translate` の段階でフィードバックを提供すると、内部 Agent が入力を分析します。フィードバックが一度限りの修正(例:タイポの修正)か、再利用可能なポリシー(例:「コードコメントは常に英語で書く」)かを判断します。それが永続的な指示を表す場合、新しいプリファレンスルールを作成し、プロジェクトの `preferences.yml` ファイルに保存します。
|
|
63
|
-
|
|
64
|
-
### ルールのプロパティ
|
|
65
|
-
|
|
66
|
-
`preferences.yml` に保存される各ルールは、次の構造を持ちます。
|
|
67
|
-
|
|
68
|
-
<x-field-group>
|
|
69
|
-
<x-field data-name="id" data-type="string" data-desc="ルールの一意でランダムに生成された識別子(例:pref_a1b2c3d4e5f6g7h8)。"></x-field>
|
|
70
|
-
<x-field data-name="active" data-type="boolean" data-desc="ルールが現在有効かどうかを示します。無効なルールは生成タスク中に無視されます。"></x-field>
|
|
71
|
-
<x-field data-name="scope" data-type="string">
|
|
72
|
-
<x-field-desc markdown>ルールをいつ適用するかを定義します。有効なスコープは `global`、`structure`、`document`、または `translation` です。</x-field-desc>
|
|
73
|
-
</x-field>
|
|
74
|
-
<x-field data-name="rule" data-type="string" data-desc="将来のタスクでAIに渡される、具体的で洗練された指示。"></x-field>
|
|
75
|
-
<x-field data-name="feedback" data-type="string" data-desc="ユーザーから提供された元の自然言語のフィードバック。参照用に保存されます。"></x-field>
|
|
76
|
-
<x-field data-name="createdAt" data-type="string" data-desc="ルールが作成された日時を示すISO 8601タイムスタンプ。"></x-field>
|
|
77
|
-
<x-field data-name="paths" data-type="string[]" data-required="false">
|
|
78
|
-
<x-field-desc markdown>オプションのファイルパスのリスト。存在する場合、ルールはこれらの特定のソースファイルに対して生成されたコンテンツにのみ適用されます。</x-field-desc>
|
|
79
|
-
</x-field>
|
|
80
|
-
</x-field-group>
|
|
81
|
-
|
|
82
|
-
## CLIによるプリファレンスの管理
|
|
83
|
-
|
|
84
|
-
`aigne doc prefs` コマンドを使用して、保存されているすべてのプリファレンスを表示および管理できます。これにより、ルールの一覧表示、有効化、無効化、または永久に削除することができます。
|
|
85
|
-
|
|
86
|
-
### すべてのプリファレンスを一覧表示
|
|
87
|
-
|
|
88
|
-
保存されているすべてのプリファレンス(有効なものと無効なものの両方)の完全なリストを表示するには、`--list` フラグを使用します。
|
|
89
|
-
|
|
90
|
-
```bash すべてのプリファレンスを一覧表示 icon=lucide:terminal
|
|
91
|
-
aigne doc prefs --list
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
このコマンドは、各ルールのステータス、スコープ、ID、およびパスの制限を示すフォーマットされたリストを表示します。
|
|
95
|
-
|
|
96
|
-
```text 出力例 icon=lucide:clipboard-list
|
|
97
|
-
# ユーザープリファレンス
|
|
98
|
-
|
|
99
|
-
**フォーマットの説明:**
|
|
100
|
-
- 🟢 = 有効なプリファレンス, ⚪ = 無効なプリファレンス
|
|
101
|
-
- [scope] = プリファレンススコープ (global, structure, document, translation)
|
|
102
|
-
- ID = 一意のプリファレンス識別子
|
|
103
|
-
- Paths = 特定のファイルパス(該当する場合)
|
|
104
|
-
|
|
105
|
-
🟢 [structure] pref_a1b2c3d4e5f6g7h8 | Paths: overview.md
|
|
106
|
-
概要ドキュメントの最後に「次のステップ」セクションを追加します。
|
|
107
|
-
|
|
108
|
-
⚪ [document] pref_i9j0k1l2m3n4o5p6
|
|
109
|
-
コードコメントは英語で記述する必要があります。
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
### プリファレンスの無効化と再有効化
|
|
113
|
-
|
|
114
|
-
ルールを削除せずに一時的に無効にする必要がある場合は、`--toggle` フラグで有効ステータスを切り替えることができます。IDなしでコマンドを実行すると対話モードが起動し、切り替えるプリファレンスを1つ以上選択できます。
|
|
115
|
-
|
|
116
|
-
```bash プリファレンスを対話的に切り替える icon=lucide:terminal
|
|
117
|
-
aigne doc prefs --toggle
|
|
118
|
-
```
|
|
119
|
-
|
|
120
|
-
特定のルールを直接切り替えるには、`--id` フラグでそのIDを指定します。このアクションは、ルールの `active` プロパティを変更します。
|
|
121
|
-
|
|
122
|
-
```bash 特定のプリファレンスを切り替える icon=lucide:terminal
|
|
123
|
-
aigne doc prefs --toggle --id pref_i9j0k1l2m3n4o5p6
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
### プリファレンスの削除
|
|
127
|
-
|
|
128
|
-
1つ以上のプリファレンスを完全に削除するには、`--remove` フラグを使用します。この操作は元に戻せません。
|
|
129
|
-
|
|
130
|
-
対話的な選択プロンプトを表示するには、IDなしでコマンドを実行します。
|
|
131
|
-
|
|
132
|
-
```bash プリファレンスを対話的に削除する icon=lucide:terminal
|
|
133
|
-
aigne doc prefs --remove
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
特定のルールを直接削除するには、`--id` フラグでそのIDを指定します。
|
|
137
|
-
|
|
138
|
-
```bash 特定のプリファレンスを削除する icon=lucide:terminal
|
|
139
|
-
aigne doc prefs --remove --id pref_a1b2c3d4e5f6g7h8
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## 次のステップ
|
|
143
|
-
|
|
144
|
-
プリファレンスの管理は、DocSmithをプロジェクトの特定のニーズに合わせて調整する上で重要な部分です。その他のカスタマイズオプションについては、メインの[設定ガイド](./configuration.md)をご覧ください。
|