Skip to content

Commit eddb70b

Browse files
committed
docs(cli): add knowledge base initialization and media import instructions
- Introduced a new section on knowledge base initialization with a dry-run option to preview setup. - Added details on billing implications and cleanup actions for knowledge bases. - Included instructions for importing documents into knowledge bases and managing media support. - Updated both English and Chinese README files to ensure consistency and clarity in documentation.
1 parent c4ce767 commit eddb70b

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

‎packages/cli/README.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,18 @@ Once installed, just describe your task to your AI Agent — no need to assemble
125125

126126
> More examples and scenarios: [Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)
127127
128+
### Try a knowledge base
129+
130+
With a valid API key and workspace, preview initialization first:
131+
132+
```bash
133+
bl knowledge init --workspace-id <workspace-id> --dry-run
134+
```
135+
136+
Knowledge bases accrue running-time charges from creation, even without queries. The one-time Standard Edition 720-hour allowance is shared across knowledge bases and expires 30 days after activation for new users. Model calls cost extra; your remaining allowance is unknown. Review the plan and [billing rules](https://help.aliyun.com/zh/model-studio/billing-for-knowledge-base), then add `--yes` to the same command **after confirming the operation**, removing `--dry-run` to execute.
137+
138+
Keep the returned IDs and recovery record. Closing the CLI or a later failure does not stop billing; follow the reported cleanup actions to delete unused knowledge bases. See the [Knowledge Studio quick start](packages/kscli/README.md#quick-start) for retrieval and cleanup. The `bailian-knowledge` Skill is available through `bl skill init`.
139+
128140
## Authentication
129141

130142
### Console Login (OAuth, Recommended)
@@ -204,3 +216,7 @@ Memory documentation (Chinese): [capability matrix](https://github.com/modelstud
204216
| Get API Key | https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key |
205217
| Get Token Plan API Key | https://bailian.console.aliyun.com/cn-beijing?tab=plan#/efm/subscription/overview |
206218
| Get AccessKey | https://ram.console.aliyun.com/manage/ak |
219+
220+
### RAG audio and video
221+
222+
`bl knowledge doc import --index-id <id> --doc-id <fileId>` imports an existing file into a knowledge base; `doc list --details` shows per-file processing settings. Media support includes parser options, streaming uploads, and media references in search/chunk output. Chat JSON separates the final answer from phases, tools, docs, usage, and raw events; quiet mode emits only the final answer. See the [command guide](docs/knowledge/knowledge-cli-guide.md).

‎packages/cli/README.zh.md‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,18 @@ irm https://bailian.aliyun.com/cli/install.ps1 | iex
124124

125125
> 更多案例与使用场景:[阿里云百炼 CLI 官方主页](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)
126126
127+
### 体验知识库
128+
129+
准备有效的 API Key 和工作空间后,先预览初始化计划:
130+
131+
```bash
132+
bl knowledge init --workspace-id <workspace-id> --dry-run
133+
```
134+
135+
知识库创建成功即持续按时计费,即使没有检索也一样。标准版一次性 720 小时额度由多个知识库共享,新用户开通后 30 天内有效;模型调用另计,当前账户剩余额度未知。查看计划与[计费规则](https://help.aliyun.com/zh/model-studio/billing-for-knowledge-base),**确认本次操作后**,在同一命令中去掉 `--dry-run` 并添加 `--yes` 执行。
136+
137+
保留返回的 ID 和恢复记录。退出 CLI 或后续步骤失败不会停止计费;按返回的清理动作删除不再需要的知识库。检索及清理示例见 [Knowledge Studio 快速开始](packages/kscli/README.zh.md#快速开始)。知识库 Skill `bailian-knowledge` 通过 `bl skill init` 安装。
138+
127139
## 认证方式
128140

129141
### 控制台登录(OAuth,推荐)
@@ -203,3 +215,7 @@ Memory 用户文档:[能力矩阵](https://github.com/modelstudioai/cli/blob/m
203215
| 获取 API Key | https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key |
204216
| 获取 Token Plan API Key | https://bailian.console.aliyun.com/cn-beijing?tab=plan#/efm/subscription/overview |
205217
| 获取 AccessKey | https://ram.console.aliyun.com/manage/ak |
218+
219+
### RAG 音视频接入
220+
221+
`bl knowledge doc import --index-id <id> --doc-id <fileId>` 将历史文件导入已有库;`doc list --details` 查看文件级处理参数。支持音视频 parser、流式上传,以及检索/切片中的媒体来源展示。问答 JSON 将最终 answer 与 phases/tools/docs/usage/events 分开保存,quiet 仅输出最终回答。参阅 [命令指南](docs/knowledge/knowledge-cli-guide.md)。

0 commit comments

Comments
 (0)