Skip to content

Commit 8d3f2ae

Browse files
committed
docs: add and unify trace_id field docs for chat/workflow APIs (zh/en/ja)
1 parent 7df1268 commit 8d3f2ae

File tree

9 files changed

+52
-1
lines changed

9 files changed

+52
-1
lines changed

web/app/components/develop/template/template_advanced_chat.en.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ Chat applications support session persistence, allowing previous chat history to
8080
Auto-generate title, default is `true`.
8181
If set to `false`, can achieve async title generation by calling the conversation rename API and setting `auto_generate` to `true`.
8282
</Property>
83+
<Property name='trace_id' type='string' key='trace_id'>
84+
(Optional) External trace ID. Used for integration with existing business trace components to achieve end-to-end distributed tracing. If not provided, the system will automatically generate a trace_id. Supports the following three ways to pass, in order of priority:<br/>
85+
- Header: via HTTP Header <code>X-Trace-Id</code>, highest priority.<br/>
86+
- Query parameter: via URL query parameter <code>trace_id</code>.<br/>
87+
- Request Body: via request body field <code>trace_id</code> (i.e., this field).<br/>
88+
</Property>
8389
</Properties>
8490

8591
### Response

web/app/components/develop/template/template_advanced_chat.ja.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
8080
タイトルを自動生成、デフォルトは`true`
8181
`false`に設定すると、会話のリネームAPIを呼び出し、`auto_generate``true`に設定することで非同期タイトル生成を実現できます。
8282
</Property>
83+
<Property name='trace_id' type='string' key='trace_id'>
84+
(オプション)外部トレースID。既存の業務システムのトレースコンポーネントと連携し、エンドツーエンドの分散トレーシングを実現するために使用します。指定がない場合、システムが自動的に trace_id を生成します。以下の3つの方法で渡すことができ、優先順位は次のとおりです:<br/>
85+
- Header:HTTPヘッダー <code>X-Trace-Id</code> で渡す(最優先)。<br/>
86+
- クエリパラメータ:URLクエリパラメータ <code>trace_id</code> で渡す。<br/>
87+
- リクエストボディ:リクエストボディの <code>trace_id</code> フィールドで渡す(本フィールド)。<br/>
88+
</Property>
8389
</Properties>
8490

8591
### 応答

web/app/components/develop/template/template_advanced_chat.zh.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
7878
<Property name='auto_generate_name' type='bool' key='auto_generate_name'>
7979
(选填)自动生成标题,默认 `true`。 若设置为 `false`,则可通过调用会话重命名接口并设置 `auto_generate``true` 实现异步生成标题。
8080
</Property>
81+
<Property name='trace_id' type='string' key='trace_id'>
82+
(选填)外部链路追踪 ID。适用于与业务系统已有的trace组件打通,实现端到端分布式追踪等场景。如果未指定,系统会自动生成<code>trace_id</code>。支持以下三种方式传递,具体优先级依次为:<br/>
83+
- Header:通过 HTTP Header <code>X-Trace-Id</code> 传递,优先级最高。<br/>
84+
- Query 参数:通过 URL 查询参数 <code>trace_id</code> 传递。<br/>
85+
- Request Body:通过请求体字段 <code>trace_id</code> 传递(即本字段)。<br/>
86+
</Property>
8187
</Properties>
8288

8389
### Response

web/app/components/develop/template/template_chat.en.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ Chat applications support session persistence, allowing previous chat history to
7474
Auto-generate title, default is `true`.
7575
If set to `false`, can achieve async title generation by calling the conversation rename API and setting `auto_generate` to `true`.
7676
</Property>
77+
<Property name='trace_id' type='string' key='trace_id'>
78+
(Optional) External trace ID. Used for integration with existing business trace components to achieve end-to-end distributed tracing. If not provided, the system will automatically generate a trace_id. Supports the following three ways to pass, in order of priority:<br/>
79+
- Header: via HTTP Header <code>X-Trace-Id</code>, highest priority.<br/>
80+
- Query parameter: via URL query parameter <code>trace_id</code>.<br/>
81+
- Request Body: via request body field <code>trace_id</code> (i.e., this field).<br/>
82+
</Property>
7783
</Properties>
7884

7985
### Response

web/app/components/develop/template/template_chat.ja.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
7474
タイトルを自動生成します。デフォルトは`true`です。
7575
`false`に設定すると、会話のリネームAPIを呼び出し、`auto_generate``true`に設定することで非同期タイトル生成を実現できます。
7676
</Property>
77+
<Property name='trace_id' type='string' key='trace_id'>
78+
(オプション)外部トレースID。既存の業務システムのトレースコンポーネントと連携し、エンドツーエンドの分散トレーシングを実現するために使用します。指定がない場合、システムが自動的に trace_id を生成します。以下の3つの方法で渡すことができ、優先順位は次のとおりです:<br/>
79+
- Header:HTTPヘッダー <code>X-Trace-Id</code> で渡す(最優先)。<br/>
80+
- クエリパラメータ:URLクエリパラメータ <code>trace_id</code> で渡す。<br/>
81+
- リクエストボディ:リクエストボディの <code>trace_id</code> フィールドで渡す(本フィールド)。<br/>
82+
</Property>
7783
</Properties>
7884

7985
### 応答

web/app/components/develop/template/template_chat.zh.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx'
7373
<Property name='auto_generate_name' type='bool' key='auto_generate_name'>
7474
(选填)自动生成标题,默认 `true`。 若设置为 `false`,则可通过调用会话重命名接口并设置 `auto_generate``true` 实现异步生成标题。
7575
</Property>
76+
<Property name='trace_id' type='string' key='trace_id'>
77+
(选填)外部链路追踪 ID。适用于与业务系统已有的trace组件打通,实现端到端分布式追踪等场景。如果未指定,系统会自动生成<code>trace_id</code>。支持以下三种方式传递,具体优先级依次为:<br/>
78+
- Header:通过 HTTP Header <code>X-Trace-Id</code> 传递,优先级最高。<br/>
79+
- Query 参数:通过 URL 查询参数 <code>trace_id</code> 传递。<br/>
80+
- Request Body:通过请求体字段 <code>trace_id</code> 传递(即本字段)。<br/>
81+
</Property>
7682
</Properties>
7783

7884
### Response

web/app/components/develop/template/template_workflow.en.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ Workflow applications offers non-session support and is ideal for translation, a
6666
Should be uniquely defined by the developer within the application.
6767
<br/>
6868
<i>The user identifier should be consistent with the user passed in the message sending interface. The Service API does not share conversations created by the WebApp.</i>
69+
- `trace_id` (string) Optional
70+
External trace ID. Used for integration with existing business trace components to achieve end-to-end distributed tracing. If not provided, the system will automatically generate a trace_id. Supports the following three ways to pass, in order of priority:
71+
1. Header: via HTTP Header `X-Trace-Id`, highest priority.
72+
2. Query parameter: via URL query parameter `trace_id`.
73+
3. Request Body: via request body field `trace_id` (i.e., this field).
6974

7075
### Response
7176
When `response_mode` is `blocking`, return a CompletionResponse object.

web/app/components/develop/template/template_workflow.ja.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from
6666
ユーザー識別子、エンドユーザーのアイデンティティを定義するために使用されます。
6767
アプリケーション内で開発者によって一意に定義される必要があります。
6868
- `files` (array[object]) オプション
69+
- `trace_id` (string) オプション
70+
外部トレースID。既存の業務システムのトレースコンポーネントと連携し、エンドツーエンドの分散トレーシングを実現するために使用します。指定がない場合、システムが自動的に trace_id を生成します。以下の3つの方法で渡すことができ、優先順位は次のとおりです:
71+
1. Header:HTTPヘッダー `X-Trace-Id` で渡す(最優先)。
72+
2. クエリパラメータ:URLクエリパラメータ `trace_id` で渡す。
73+
3. リクエストボディ:リクエストボディの `trace_id` フィールドで渡す(本フィールド)。
6974

7075

7176
### 応答

web/app/components/develop/template/template_workflow.zh.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,12 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等
6060
- `user` (string) Required
6161
用户标识,用于定义终端用户的身份,方便检索、统计。
6262
由开发者定义规则,需保证用户标识在应用内唯一。API 无法访问 WebApp 创建的会话。
63-
63+
- `files` (array[object]) 可选
64+
- `trace_id` (string) Optional
65+
外部链路追踪 ID。适用于与业务系统已有的trace组件打通,实现端到端分布式追踪等场景。如果未指定,系统将自动生成 `trace_id`。支持以下三种方式传递,具体优先级依次为:
66+
1. Header:推荐通过 HTTP Header `X-Trace-Id` 传递,优先级最高。
67+
2. Query 参数:通过 URL 查询参数 `trace_id` 传递。
68+
3. Request Body:通过请求体字段 `trace_id` 传递(即本字段)。
6469

6570
### Response
6671
`response_mode``blocking` 时,返回 CompletionResponse object。

0 commit comments

Comments
 (0)