Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions en/cloud/use-dify/nodes/llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ For **File Processing**, add file variables to prompts for multimodal models. GP
### Vision Configuration

When processing images, you can control the detail level:
- **High detail** - Better accuracy for complex images but uses more tokens
- **Low detail** - Faster processing with fewer tokens for simple images
- **High** - Better accuracy for complex images but uses more tokens
- **Low** - Faster processing with fewer tokens for simple images

The default variable selector for vision is `userinput.files` which automatically picks up files from the User Input node.

Expand Down
4 changes: 2 additions & 2 deletions en/self-host/use-dify/nodes/llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ For **File Processing**, add file variables to prompts for multimodal models. GP
### Vision Configuration

When processing images, you can control the detail level:
- **High detail** - Better accuracy for complex images but uses more tokens
- **Low detail** - Faster processing with fewer tokens for simple images
- **High** - Better accuracy for complex images but uses more tokens
- **Low** - Faster processing with fewer tokens for simple images

The default variable selector for vision is `userinput.files` which automatically picks up files from the User Input node.

Expand Down
4 changes: 2 additions & 2 deletions ja/cloud/use-dify/nodes/llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ User: {{user_input}}
### ビジョン機能設定

画像を処理する際、詳細レベルを制御できます:
- **高詳細** - 複雑な画像でより良い精度を提供しますが、より多くのトークンを使用します
- **低詳細** - シンプルな画像でより少ないトークンでより高速な処理
- **** - 複雑な画像でより良い精度を提供しますが、より多くのトークンを使用します
- **** - シンプルな画像でより少ないトークンでより高速な処理

ビジョン機能のデフォルト変数セレクターは`userinput.files`で、ユーザー入力ノードからファイルを自動的に取得します。

Expand Down
4 changes: 2 additions & 2 deletions ja/self-host/use-dify/nodes/llm.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ User: {{user_input}}
### ビジョン機能設定

画像を処理する際、詳細レベルを制御できます:
- **高詳細** - 複雑な画像でより良い精度を提供しますが、より多くのトークンを使用します
- **低詳細** - シンプルな画像でより少ないトークンでより高速な処理
- **** - 複雑な画像でより良い精度を提供しますが、より多くのトークンを使用します
- **** - シンプルな画像でより少ないトークンでより高速な処理

ビジョン機能のデフォルト変数セレクターは`userinput.files`で、ユーザー入力ノードからファイルを自動的に取得します。

Expand Down
64 changes: 32 additions & 32 deletions zh/api-reference/openapi_service.json
Original file line number Diff line number Diff line change
Expand Up @@ -3042,7 +3042,7 @@
"/workflows/logs": {
"get": {
"summary": "获取工作流日志",
"description": "**适用于**:Chatflow、Workflow。\n\n列出过往的工作流运行,支持可选筛选。每条记录是运行级摘要(状态、Token 用量、步数和耗时),而非逐节点的执行日志。\n\n如需跟踪某次运行的节点级事件,请改用流式方式:\n\n- **自行发起的运行**:以流式模式调用 [执行工作流](/zh/api-reference/workflow-runs/run-workflow),运行执行时会发送 `node_started` 和 `node_finished` 事件。\n- **已在进行中的运行**:调用 [流式获取工作流事件](/zh/api-reference/workflow-runs/stream-workflow-events) 并附带 `include_state_snapshot=true`,先重放各已执行节点的状态,再流式发送其余事件。\n\n已结束运行的节点级日志无法通过服务 API 获取。",
"description": "**适用于**:Chatflow、Workflow。\n\n列出过往的工作流运行,支持可选筛选。每条记录是运行级摘要(状态、token 用量、步数和耗时),而非逐节点的执行日志。\n\n如需跟踪某次运行的节点级事件,请改用流式方式:\n\n- **自行发起的运行**:以流式模式调用 [执行工作流](/zh/api-reference/workflow-runs/run-workflow),运行执行时会发送 `node_started` 和 `node_finished` 事件。\n- **已在进行中的运行**:调用 [流式获取工作流事件](/zh/api-reference/workflow-runs/stream-workflow-events) 并附带 `include_state_snapshot=true`,先重放各已执行节点的状态,再流式发送其余事件。\n\n已结束运行的节点级日志无法通过服务 API 获取。",
"operationId": "getWorkflowLogsCn",
"tags": [
"工作流运行"
Expand Down Expand Up @@ -5614,12 +5614,12 @@
},
"max_tokens": {
"type": "integer",
"description": "每个分段的最大令牌数。"
"description": "每个分段的最大 token 数。"
},
"chunk_overlap": {
"type": "integer",
"default": 0,
"description": "分段之间的令牌重叠数。"
"description": "分段之间的 token 重叠数。"
}
}
}
Expand Down Expand Up @@ -6421,7 +6421,7 @@
},
"tokens": {
"type": "integer",
"description": "文档中的令牌数。"
"description": "文档中的 token 数。"
},
"indexing_status": {
"type": "string",
Expand Down Expand Up @@ -7454,12 +7454,12 @@
},
"max_tokens": {
"type": "integer",
"description": "每个分段的最大令牌数。"
"description": "每个分段的最大 token 数。"
},
"chunk_overlap": {
"type": "integer",
"default": 0,
"description": "分段之间的令牌重叠数。"
"description": "分段之间的 token 重叠数。"
}
}
}
Expand Down Expand Up @@ -10250,7 +10250,7 @@
},
"tokens": {
"type": "integer",
"description": "分段内容的令牌数。"
"description": "分段内容的 token 数。"
},
"keywords": {
"type": "array",
Expand Down Expand Up @@ -13750,50 +13750,50 @@
"properties": {
"prompt_tokens": {
"type": "integer",
"description": "提示词中的令牌数。"
"description": "提示词中的 token 数。"
},
"prompt_unit_price": {
"type": "string",
"format": "decimal",
"description": "每个提示词令牌的单价。"
"description": "每个提示词 token 的单价。"
},
"prompt_price_unit": {
"type": "string",
"format": "decimal",
"description": "提示词令牌的价格单位。"
"description": "提示词 token 的价格单位。"
},
"prompt_price": {
"type": "string",
"format": "decimal",
"description": "提示词令牌的总价。"
"description": "提示词 token 的总价。"
},
"completion_tokens": {
"type": "integer",
"description": "补全内容中的令牌数。"
"description": "补全内容中的 token 数。"
},
"completion_unit_price": {
"type": "string",
"format": "decimal",
"description": "每个补全令牌的单价。"
"description": "每个补全 token 的单价。"
},
"completion_price_unit": {
"type": "string",
"format": "decimal",
"description": "补全令牌的价格单位。"
"description": "补全 token 的价格单位。"
},
"completion_price": {
"type": "string",
"format": "decimal",
"description": "补全令牌的总价。"
"description": "补全 token 的总价。"
},
"total_tokens": {
"type": "integer",
"description": "使用的令牌总数。"
"description": "使用的 token 总数。"
},
"total_price": {
"type": "string",
"format": "decimal",
"description": "所有令牌的总价。"
"description": "所有 token 的总价。"
},
"currency": {
"type": "string",
Expand Down Expand Up @@ -15326,7 +15326,7 @@
},
"total_tokens": {
"type": "integer",
"description": "消耗的总令牌数。"
"description": "消耗的总 token 数。"
},
"total_steps": {
"type": "integer",
Expand Down Expand Up @@ -15518,7 +15518,7 @@
"type": "object",
"nullable": true,
"additionalProperties": true,
"description": "执行元数据(例如令牌用量、模型信息)。在简化 API 响应中可能为 `null`。"
"description": "执行元数据(例如 token 用量、模型信息)。在简化 API 响应中可能为 `null`。"
},
"created_at": {
"type": "integer",
Expand Down Expand Up @@ -15847,7 +15847,7 @@
},
"total_tokens": {
"type": "integer",
"description": "所有迭代中消耗的令牌总数。"
"description": "所有迭代中消耗的 token 总数。"
},
"created_at": {
"type": "integer",
Expand Down Expand Up @@ -16044,7 +16044,7 @@
},
"total_tokens": {
"type": "integer",
"description": "所有循环迭代中消耗的令牌总数。"
"description": "所有循环迭代中消耗的 token 总数。"
},
"created_at": {
"type": "integer",
Expand Down Expand Up @@ -16244,7 +16244,7 @@
},
"total_tokens": {
"type": "integer",
"description": "消耗的总令牌数。"
"description": "消耗的总 token 数。"
},
"total_steps": {
"type": "integer",
Expand Down Expand Up @@ -16512,7 +16512,7 @@
},
"total_tokens": {
"type": "integer",
"description": "消耗的总令牌数。"
"description": "消耗的总 token 数。"
},
"created_at": {
"type": "integer",
Expand Down Expand Up @@ -16644,7 +16644,7 @@
},
"total_tokens": {
"type": "integer",
"description": "消耗的总令牌数。"
"description": "消耗的总 token 数。"
},
"total_steps": {
"type": "integer",
Expand Down Expand Up @@ -17262,7 +17262,7 @@
},
"total_tokens": {
"type": "integer",
"description": "所有节点消耗的总令牌数。"
"description": "所有节点消耗的总 token 数。"
},
"total_steps": {
"type": "integer",
Expand Down Expand Up @@ -17540,12 +17540,12 @@
"execution_metadata": {
"type": "object",
"nullable": true,
"description": "执行元数据,包含令牌用量。",
"description": "执行元数据,包含 token 用量。",
"properties": {
"total_tokens": {
"type": "integer",
"nullable": true,
"description": "该节点消耗的总令牌数。"
"description": "该节点消耗的总 token 数。"
},
"total_price": {
"type": "number",
Expand Down Expand Up @@ -17896,7 +17896,7 @@
"execution_metadata": {
"type": "object",
"additionalProperties": true,
"description": "执行元数据,包含令牌用量。"
"description": "执行元数据,包含 token 用量。"
},
"finished_at": {
"type": "integer",
Expand Down Expand Up @@ -18088,7 +18088,7 @@
"execution_metadata": {
"type": "object",
"additionalProperties": true,
"description": "执行元数据,包含令牌用量。"
"description": "执行元数据,包含 token 用量。"
},
"finished_at": {
"type": "integer",
Expand Down Expand Up @@ -18279,7 +18279,7 @@
},
"total_tokens": {
"type": "integer",
"description": "消耗的总令牌数。"
"description": "消耗的总 token 数。"
},
"total_steps": {
"type": "integer",
Expand Down Expand Up @@ -19211,7 +19211,7 @@
},
"tokens": {
"type": "integer",
"description": "文档中的令牌总数。"
"description": "文档中的 token 总数。"
},
"indexing_status": {
"type": "string",
Expand Down Expand Up @@ -19325,7 +19325,7 @@
},
"tokens": {
"type": "integer",
"description": "分段内容的令牌数。"
"description": "分段内容的 token 数。"
},
"keywords": {
"type": "array",
Expand Down
14 changes: 7 additions & 7 deletions zh/cli/authenticate.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 认证
description: 从 CLI 登录你的 Dify 主机,了解 token 的存储位置,并管理你的会话
description: 从 CLI 登录你的 Dify 主机,了解令牌的存储位置,并管理你的会话
---

> 本文档由 AI 自动翻译。如有任何不准确之处,请参考 [英文原版](/en/cli/authenticate)。
Expand Down Expand Up @@ -58,7 +58,7 @@ description: 从 CLI 登录你的 Dify 主机,了解 token 的存储位置,

如果某条命令以 `auth_expired`(退出码 4)失败,说明服务器已使你的会话过期或将其吊销。

重新运行 `difyctl auth login`。无需先登出,新的登录会刷新已存储的 token
重新运行 `difyctl auth login`。无需先登出,新的登录会刷新已存储的令牌

## 查看当前登录身份

Expand Down Expand Up @@ -92,15 +92,15 @@ difyctl auth logout
✓ Logged out of cloud.dify.ai
```

这会吊销服务器上的会话,并从你的机器上删除 token 和会话记录。即便服务器端的吊销失败,本地凭据仍会被清除。
这会吊销服务器上的会话,并从你的机器上删除令牌和会话记录。即便服务器端的吊销失败,本地凭据仍会被清除。

## Token 的存储位置
## 令牌的存储位置

登录后会存储一个 OAuth bearer token,可通过 `dfoa_` 前缀识别。它代表你本人:你的账户在工作空间中能做什么,这个 token 在 CLI 中就能做什么。
登录后会存储一个 OAuth Bearer 令牌,可通过 `dfoa_` 前缀识别。它代表你本人:你的账户在工作空间中能做什么,这个令牌在 CLI 中就能做什么。

只要操作系统提供凭据存储,`difyctl` 就会把 token 存入其中:macOS 上是 Keychain,Windows 上是 Credential Manager,Linux 上是 Secret Service。如果没有可用的凭据存储,则回退到 `difyctl` 配置目录下一个权限为 `0600` 的 `tokens.yml` 文件。
只要操作系统提供凭据存储,`difyctl` 就会把令牌存入其中:macOS 上是 Keychain,Windows 上是 Credential Manager,Linux 上是 Secret Service。如果没有可用的凭据存储,则回退到 `difyctl` 配置目录下一个权限为 `0600` 的 `tokens.yml` 文件。

`difyctl` 在你登录时选定存储位置,此后整个会话都使用它。会话元数据(主机、账户、工作空间)与 token 一同保存在 `hosts.yml` 中。
`difyctl` 在你登录时选定存储位置,此后整个会话都使用它。会话元数据(主机、账户、工作空间)与令牌一同保存在 `hosts.yml` 中。

配置目录在 macOS 和 Linux 上是 `~/.config/difyctl`(Linux 遵循 `XDG_CONFIG_HOME`),在 Windows 上是 `%APPDATA%\difyctl`。设置 [`DIFY_CONFIG_DIR`](/zh/cli/reference/environment-variables) 可覆盖此路径。

Expand Down
4 changes: 2 additions & 2 deletions zh/cli/integrate-agents/auth-for-agent-deployments.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ difyctl auth whoami

<Steps>
<Step title="在没有操作系统钥匙串的机器上登录">
使用无界面的 Linux 服务器或容器。在没有钥匙串时,`difyctl` 会把 token 保存到 [配置目录](/zh/cli/authenticate#token-的存储位置) 下的 `tokens.yml`,使整个目录可移植。
使用无界面的 Linux 服务器或容器。在没有钥匙串时,`difyctl` 会把令牌保存到 [配置目录](/zh/cli/authenticate#令牌的存储位置) 下的 `tokens.yml`,使整个目录可移植。

复制之前,先确认配置目录(默认为 `~/.config/difyctl`)中存在 `tokens.yml`。如果文件缺失,说明 token 已被钥匙串捕获,且无法导出;请在目标机器上直接通过 [方式一:在目标机器上登录](#方式一:在目标机器上登录) 登录。
复制之前,先确认配置目录(默认为 `~/.config/difyctl`)中存在 `tokens.yml`。如果文件缺失,说明令牌已被钥匙串捕获,且无法导出;请在目标机器上直接通过 [方式一:在目标机器上登录](#方式一:在目标机器上登录) 登录。
</Step>
<Step title="将配置目录复制到目标机器">
复制后,用 [`DIFY_CONFIG_DIR`](/zh/cli/reference/environment-variables) 让 `difyctl` 指向该目录。对于容器,应在运行时挂载该目录,而不是把它打包进镜像:
Expand Down
2 changes: 1 addition & 1 deletion zh/cli/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -93,5 +93,5 @@ Daily Report 7f3e9a2b-1c4d-4e8f-9a0b-2d5c8e1f4a7b workflow 2026-06-05T22:41:0
## 后续步骤

- **开箱即用的日常命令**:[常见任务](/zh/cli/common-tasks)
- **token 存储位置与会话机制**:[认证](/zh/cli/authenticate)
- **令牌存储位置与会话机制**:[认证](/zh/cli/authenticate)
- **`difyctl` 的其余全部能力**:[命令索引](/zh/cli/reference/command-index)
Loading
Loading