From d93b951d9258aa379eace7d366a68672833cc2c7 Mon Sep 17 00:00:00 2001 From: "zeyu.fz" Date: Tue, 9 Jun 2026 15:53:53 +0800 Subject: [PATCH] =?UTF-8?q?docs(cli):=20=E6=9B=B4=E6=96=B0=20API=20Key=20?= =?UTF-8?q?=E5=92=8C=E7=9B=B8=E5=85=B3=E9=93=BE=E6=8E=A5=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/cli/README.md | 8 ++--- skills/bailian-cli/reference/index.md | 2 +- skills/bailian-cli/reference/knowledge.md | 37 +++++++++++++---------- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/packages/cli/README.md b/packages/cli/README.md index 52eae74..79ab95e 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -9,7 +9,7 @@ [![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org) [![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE) -[Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&) · [中文文档](https://github.com/modelstudioai/cli/blob/main/README.zh.md) · [API Documentation](https://help.aliyun.com/zh/model-studio/) · [Get API Key](https://bailian.console.aliyun.com/cli?source_channel=key_github&) +[Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&) · [中文文档](https://github.com/modelstudioai/cli/blob/main/README.zh.md) · [API Documentation](https://help.aliyun.com/zh/model-studio/) · [Get API Key](https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key) --- @@ -119,7 +119,7 @@ bl usage free --model qwen3-max ### DashScope API Key -Required for most commands. Get your key from the [DashScope Console](https://bailian.console.aliyun.com/cli?source_channel=key_github&). +Required for most commands. Get your key from the [DashScope Console](https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key). ```bash # Option 1: Environment variable @@ -176,8 +176,8 @@ Config file location: `~/.bailian/config.json` | Aliyun Model Studio CLI Site | https://bailian.console.aliyun.com/cli?source_channel=cli_github& | | DashScope API Docs | https://help.aliyun.com/zh/model-studio/ | | Qwen Model List | https://help.aliyun.com/zh/model-studio/getting-started/models | -| Aliyun Model Studio Console | https://bailian.console.aliyun.com/ | -| Get API Key | https://bailian.console.aliyun.com/cli?source_channel=key_github& | +| Aliyun Model Studio Console | https://bailian.console.aliyun.com/?source_channel=cli_github | +| Get API Key | https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/api-key | | Get AccessKey | https://ram.console.aliyun.com/manage/ak | ## Changelog diff --git a/skills/bailian-cli/reference/index.md b/skills/bailian-cli/reference/index.md index 8c49502..79f462c 100644 --- a/skills/bailian-cli/reference/index.md +++ b/skills/bailian-cli/reference/index.md @@ -23,7 +23,7 @@ Use this index for the full quick index and global flags. | `bl file upload` | Upload a local file to DashScope temporary storage (48h) | [file.md](file.md) | | `bl image edit` | Edit an existing image with text instructions (Qwen-Image) | [image.md](image.md) | | `bl image generate` | Generate images (Qwen-Image / wan2.x) | [image.md](image.md) | -| `bl knowledge retrieve` | Retrieve from a Bailian knowledge base (requires AK/SK) | [knowledge.md](knowledge.md) | +| `bl knowledge retrieve` | Retrieve from a Bailian knowledge base | [knowledge.md](knowledge.md) | | `bl mcp call` | Call a tool on an MCP server (tools/call) | [mcp.md](mcp.md) | | `bl mcp list` | List MCP servers activated under your Bailian account | [mcp.md](mcp.md) | | `bl mcp tools` | List tools exposed by an MCP server (tools/list) | [mcp.md](mcp.md) | diff --git a/skills/bailian-cli/reference/knowledge.md b/skills/bailian-cli/reference/knowledge.md index a4406cf..b63b0de 100644 --- a/skills/bailian-cli/reference/knowledge.md +++ b/skills/bailian-cli/reference/knowledge.md @@ -7,9 +7,9 @@ Index: [index.md](index.md) ## Commands in this group -| Command | Description | -| ----------------------- | ------------------------------------------------------- | -| `bl knowledge retrieve` | Retrieve from a Bailian knowledge base (requires AK/SK) | +| Command | Description | +| ----------------------- | -------------------------------------- | +| `bl knowledge retrieve` | Retrieve from a Bailian knowledge base | ## Command details @@ -18,28 +18,33 @@ Index: [index.md](index.md) | Field | Value | | --------------- | -------------------------------------------------------------- | | **Name** | `knowledge retrieve` | -| **Description** | Retrieve from a Bailian knowledge base (requires AK/SK) | +| **Description** | Retrieve from a Bailian knowledge base | | **Usage** | `bl knowledge retrieve --index-id --query [flags]` | #### Options -| Flag | Type | Required | Description | -| --------------------------- | ------- | -------- | -------------------------------------------------- | -| `--index-id ` | string | yes | Knowledge base index ID (required) | -| `--query ` | string | yes | Search query (required) | -| `--workspace-id ` | string | no | Bailian workspace ID (or env BAILIAN_WORKSPACE_ID) | -| `--top-k ` | number | no | Number of results (default: 10) | -| `--rerank` | boolean | no | Enable rerank | -| `--rerank-top-n ` | number | no | Rerank top N results | -| `--access-key-id ` | string | no | Alibaba Cloud Access Key ID (or env) | -| `--access-key-secret ` | string | no | Alibaba Cloud Access Key Secret (or env) | +| Flag | Type | Required | Description | +| ------------------------------- | ------- | -------- | ---------------------------------------------------------- | +| `--index-id ` | string | yes | Knowledge base index ID (required) | +| `--query ` | string | yes | Search query (required) | +| `--dense-similarity-top-k ` | number | no | Dense retrieval top K (API-KEY only) | +| `--sparse-similarity-top-k ` | number | no | Sparse retrieval top K (API-KEY only) | +| `--rerank` | boolean | no | Enable reranking | +| `--rerank-top-n ` | number | no | Rerank top N results | +| `--rerank-model ` | string | no | Rerank model, e.g. qwen3-rerank-hybrid (API-KEY only) | +| `--rerank-mode ` | string | no | Rerank mode: qa, similar, or custom (API-KEY only) | +| `--rerank-instruct ` | string | no | Custom rerank instruction, when mode=custom (API-KEY only) | +| `--top-k ` | number | no | Number of results (deprecated, use --rerank-top-n) | +| `--workspace-id ` | string | no | Bailian workspace ID (required for AK/SK auth) | +| `--access-key-id ` | string | no | Alibaba Cloud Access Key ID (deprecated) | +| `--access-key-secret ` | string | no | Alibaba Cloud Access Key Secret (deprecated) | #### Examples ```bash -bl knowledge retrieve --index-id idx_xxx --query "如何使用阿里云百炼" --workspace-id ws_xxx +bl knowledge retrieve --index-id idx_xxx --query "如何使用阿里云百炼" ``` ```bash -bl knowledge retrieve --index-id idx_xxx --query "API限流" --top-k 5 --rerank +bl knowledge retrieve --index-id idx_xxx --query "API限流" --rerank --rerank-model qwen3-rerank-hybrid ```