From f4ee50a7ad72d8838417169b1dd9621b9fd9833b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=9E=E6=B3=95=E6=93=8D=E4=BD=9C?= Date: Wed, 8 Jan 2025 18:37:12 +0800 Subject: [PATCH] chore: improve app doc (#12490) --- web/app/components/develop/doc.tsx | 18 +++++++++++ .../develop/template/template.en.mdx | 22 +++---------- .../develop/template/template.ja.mdx | 22 +++---------- .../develop/template/template.zh.mdx | 21 ++---------- .../template/template_advanced_chat.en.mdx | 32 ++++--------------- .../template/template_advanced_chat.ja.mdx | 32 ++++--------------- .../template/template_advanced_chat.zh.mdx | 32 +++---------------- .../develop/template/template_chat.en.mdx | 24 ++++---------- .../develop/template/template_chat.ja.mdx | 32 ++++--------------- .../develop/template/template_chat.zh.mdx | 32 +++---------------- .../develop/template/template_workflow.en.mdx | 22 +++---------- .../develop/template/template_workflow.ja.mdx | 22 +++---------- .../develop/template/template_workflow.zh.mdx | 23 +++---------- 13 files changed, 75 insertions(+), 259 deletions(-) diff --git a/web/app/components/develop/doc.tsx b/web/app/components/develop/doc.tsx index d3076c4e746b4f..fd524ef0c16f6f 100644 --- a/web/app/components/develop/doc.tsx +++ b/web/app/components/develop/doc.tsx @@ -61,6 +61,23 @@ const Doc = ({ appDetail }: IDocProps) => { // Run after component has rendered setTimeout(extractTOC, 0) }, [appDetail, locale]) + + const handleTocClick = (e: React.MouseEvent, item: { href: string; text: string }) => { + e.preventDefault() + const targetId = item.href.replace('#', '') + const element = document.getElementById(targetId) + if (element) { + const scrollContainer = document.querySelector('.overflow-auto') + if (scrollContainer) { + const headerOffset = 80 + const elementTop = element.offsetTop - headerOffset + scrollContainer.scrollTo({ + top: elementTop, + behavior: 'smooth', + }) + } + } + } return (
@@ -82,6 +99,7 @@ const Doc = ({ appDetail }: IDocProps) => { handleTocClick(e, item)} > {item.text} diff --git a/web/app/components/develop/template/template.en.mdx b/web/app/components/develop/template/template.en.mdx index 877955039c82ca..ea3b7f3d235051 100755 --- a/web/app/components/develop/template/template.en.mdx +++ b/web/app/components/develop/template/template.en.mdx @@ -444,22 +444,16 @@ The text generation application offers non-session support and is ideal for tran Used to get basic information about this application - ### Query - - - User identifier, defined by the developer's rules, must be unique within the application. - - ### Response - `name` (string) application name - `description` (string) application description - `tags` (array[string]) application tags - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -490,14 +484,6 @@ The text generation application offers non-session support and is ideal for tran Used at the start of entering the page to obtain information such as features, input parameter names, types, and default values. - ### Query - - - - User identifier, defined by the developer's rules, must be unique within the application. - - - ### Response - `opening_statement` (string) Opening statement - `suggested_questions` (array[string]) List of suggested questions for the opening @@ -541,10 +527,10 @@ The text generation application offers non-session support and is ideal for tran - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template.ja.mdx b/web/app/components/develop/template/template.ja.mdx index c3b376f2e743c2..4670404277584d 100755 --- a/web/app/components/develop/template/template.ja.mdx +++ b/web/app/components/develop/template/template.ja.mdx @@ -442,22 +442,16 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from このアプリケーションの基本情報を取得するために使用されます - ### Query - - - ユーザー識別子、開発者のルールによって定義され、アプリケーション内で一意でなければなりません。 - - ### Response - `name` (string) アプリケーションの名前 - `description` (string) アプリケーションの説明 - `tags` (array[string]) アプリケーションのタグ - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -488,14 +482,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from ページ開始時に、機能、入力パラメータ名、タイプ、デフォルト値などの情報を取得するために使用されます。 - ### クエリ - - - - 開発者のルールで定義されたユーザー識別子。アプリケーション内で一意である必要があります。 - - - ### レスポンス - `opening_statement` (string) 開始文 - `suggested_questions` (array[string]) 開始時の提案質問リスト @@ -539,10 +525,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template.zh.mdx b/web/app/components/develop/template/template.zh.mdx index be7470480f36df..d8cabb536d4dc0 100755 --- a/web/app/components/develop/template/template.zh.mdx +++ b/web/app/components/develop/template/template.zh.mdx @@ -419,22 +419,15 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于获取应用的基本信息 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - ### Response - `name` (string) 应用名称 - `description` (string) 应用描述 - `tags` (array[string]) 应用标签 - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -465,14 +458,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于进入页面一开始,获取功能开关、输入参数名称、类型及默认值等使用。 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - - ### Response - `opening_statement` (string) 开场白 - `suggested_questions` (array[string]) 开场推荐问题列表 @@ -518,7 +503,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_advanced_chat.en.mdx b/web/app/components/develop/template/template_advanced_chat.en.mdx index c7b92acc52a3d9..e905e9e0c62aa7 100644 --- a/web/app/components/develop/template/template_advanced_chat.en.mdx +++ b/web/app/components/develop/template/template_advanced_chat.en.mdx @@ -952,22 +952,16 @@ Chat applications support session persistence, allowing previous chat history to Used to get basic information about this application - ### Query - - - User identifier, defined by the developer's rules, must be unique within the application. - - ### Response - `name` (string) application name - `description` (string) application description - `tags` (array[string]) application tags - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -998,14 +992,6 @@ Chat applications support session persistence, allowing previous chat history to Used at the start of entering the page to obtain information such as features, input parameter names, types, and default values. - ### Query - - - - User identifier, defined by the developer's rules, must be unique within the application. - - - ### Response - `opening_statement` (string) Opening statement - `suggested_questions` (array[string]) List of suggested questions for the opening @@ -1049,10 +1035,10 @@ Chat applications support session persistence, allowing previous chat history to - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` @@ -1117,13 +1103,7 @@ Chat applications support session persistence, allowing previous chat history to Used to get icons of tools in this application - ### Query - - - User identifier, defined by the developer's rules, must be unique within the application. - - ### Response - `tool_icons`(object[string]) tool icons - `tool_name` (string) @@ -1134,9 +1114,9 @@ Chat applications support session persistence, allowing previous chat history to - (string) url of icon - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/meta?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/meta' \ -H 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_advanced_chat.ja.mdx b/web/app/components/develop/template/template_advanced_chat.ja.mdx index 67e8d8f7fec888..08255b88823831 100644 --- a/web/app/components/develop/template/template_advanced_chat.ja.mdx +++ b/web/app/components/develop/template/template_advanced_chat.ja.mdx @@ -951,22 +951,16 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from このアプリケーションの基本情報を取得するために使用されます - ### Query - - - ユーザー識別子、開発者のルールによって定義され、アプリケーション内で一意でなければなりません。 - - ### Response - `name` (string) アプリケーションの名前 - `description` (string) アプリケーションの説明 - `tags` (array[string]) アプリケーションのタグ - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -997,14 +991,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from ページに入る際に、機能、入力パラメータ名、タイプ、デフォルト値などの情報を取得するために使用されます。 - ### クエリ - - - - ユーザー識別子、開発者のルールによって定義され、アプリケーション内で一意でなければなりません。 - - - ### 応答 - `opening_statement` (string) 開始の挨拶 - `suggested_questions` (array[string]) 開始時の推奨質問のリスト @@ -1048,10 +1034,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` @@ -1116,13 +1102,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from このアプリケーションのツールのアイコンを取得するために使用されます - ### クエリ - - - ユーザー識別子、開発者のルールによって定義され、アプリケーション内で一意でなければなりません。 - - ### 応答 - `tool_icons`(object[string]) ツールアイコン - `tool_name` (string) @@ -1133,9 +1113,9 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from - (string) アイコンのURL - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/meta?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/meta' \ -H 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_advanced_chat.zh.mdx b/web/app/components/develop/template/template_advanced_chat.zh.mdx index 3bb17d850299a0..8d181d7e0b7581 100755 --- a/web/app/components/develop/template/template_advanced_chat.zh.mdx +++ b/web/app/components/develop/template/template_advanced_chat.zh.mdx @@ -985,22 +985,15 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于获取应用的基本信息 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - ### Response - `name` (string) 应用名称 - `description` (string) 应用描述 - `tags` (array[string]) 应用标签 - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -1031,14 +1024,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于进入页面一开始,获取功能开关、输入参数名称、类型及默认值等使用。 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - - ### Response - `opening_statement` (string) 开场白 - `suggested_questions` (array[string]) 开场推荐问题列表 @@ -1084,7 +1069,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` @@ -1141,13 +1126,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于获取工具icon - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - ### Response - `tool_icons`(object[string]) 工具图标 - `工具名称` (string) @@ -1158,9 +1136,9 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' - (string) 图标URL - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/meta?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/meta' \ -H 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_chat.en.mdx b/web/app/components/develop/template/template_chat.en.mdx index d38e80407add80..7de329a7a0ed0e 100644 --- a/web/app/components/develop/template/template_chat.en.mdx +++ b/web/app/components/develop/template/template_chat.en.mdx @@ -980,22 +980,16 @@ Chat applications support session persistence, allowing previous chat history to Used to get basic information about this application - ### Query - - - User identifier, defined by the developer's rules, must be unique within the application. - - ### Response - `name` (string) application name - `description` (string) application description - `tags` (array[string]) application tags - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -1077,10 +1071,10 @@ Chat applications support session persistence, allowing previous chat history to - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` @@ -1145,13 +1139,7 @@ Chat applications support session persistence, allowing previous chat history to Used to get icons of tools in this application - ### Query - - - User identifier, defined by the developer's rules, must be unique within the application. - - ### Response - `tool_icons`(object[string]) tool icons - `tool_name` (string) @@ -1162,9 +1150,9 @@ Chat applications support session persistence, allowing previous chat history to - (string) url of icon - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/meta?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/meta' \ -H 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_chat.ja.mdx b/web/app/components/develop/template/template_chat.ja.mdx index 96db9912d5da71..8107f6260ada30 100644 --- a/web/app/components/develop/template/template_chat.ja.mdx +++ b/web/app/components/develop/template/template_chat.ja.mdx @@ -978,22 +978,16 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from このアプリケーションの基本情報を取得するために使用されます - ### Query - - - ユーザー識別子、開発者のルールによって定義され、アプリケーション内で一意でなければなりません。 - - ### Response - `name` (string) アプリケーションの名前 - `description` (string) アプリケーションの説明 - `tags` (array[string]) アプリケーションのタグ - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -1024,14 +1018,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from ページに入る際に、機能、入力パラメータ名、タイプ、デフォルト値などの情報を取得するために使用されます。 - ### クエリ - - - - ユーザー識別子、開発者のルールで定義され、アプリケーション内で一意でなければなりません。 - - - ### 応答 - `opening_statement` (string) 開始文 - `suggested_questions` (array[string]) 開始時の推奨質問のリスト @@ -1075,10 +1061,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` @@ -1143,13 +1129,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from このアプリケーションのツールのアイコンを取得するために使用されます - ### クエリ - - - ユーザー識別子、開発者のルールで定義され、アプリケーション内で一意でなければなりません。 - - ### 応答 - `tool_icons`(object[string]) ツールアイコン - `tool_name` (string) @@ -1160,9 +1140,9 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from - (string) アイコンのURL - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/meta?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/meta' \ -H 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_chat.zh.mdx b/web/app/components/develop/template/template_chat.zh.mdx index 3d6e3630be5129..ec845970b4e958 100644 --- a/web/app/components/develop/template/template_chat.zh.mdx +++ b/web/app/components/develop/template/template_chat.zh.mdx @@ -993,22 +993,15 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于获取应用的基本信息 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - ### Response - `name` (string) 应用名称 - `description` (string) 应用描述 - `tags` (array[string]) 应用标签 - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -1039,14 +1032,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于进入页面一开始,获取功能开关、输入参数名称、类型及默认值等使用。 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - - ### Response - `opening_statement` (string) 开场白 - `suggested_questions` (array[string]) 开场推荐问题列表 @@ -1092,7 +1077,7 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` @@ -1149,13 +1134,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' 用于获取工具icon - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - ### Response - `tool_icons`(object[string]) 工具图标 - `工具名称` (string) @@ -1166,9 +1144,9 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' - (string) 图标URL - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/meta?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/meta' \ -H 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_workflow.en.mdx b/web/app/components/develop/template/template_workflow.en.mdx index 58c533c60b1375..27c0d26505156e 100644 --- a/web/app/components/develop/template/template_workflow.en.mdx +++ b/web/app/components/develop/template/template_workflow.en.mdx @@ -610,22 +610,16 @@ Workflow applications offers non-session support and is ideal for translation, a Used to get basic information about this application - ### Query - - - User identifier, defined by the developer's rules, must be unique within the application. - - ### Response - `name` (string) application name - `description` (string) application description - `tags` (array[string]) application tags - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -656,14 +650,6 @@ Workflow applications offers non-session support and is ideal for translation, a Used at the start of entering the page to obtain information such as features, input parameter names, types, and default values. - ### Query - - - - User identifier, defined by the developer's rules, must be unique within the application. - - - ### Response - `user_input_form` (array[object]) User input form configuration - `text-input` (object) Text input control @@ -697,10 +683,10 @@ Workflow applications offers non-session support and is ideal for translation, a - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_workflow.ja.mdx b/web/app/components/develop/template/template_workflow.ja.mdx index 2653b4913d7d06..9e66973db74ec0 100644 --- a/web/app/components/develop/template/template_workflow.ja.mdx +++ b/web/app/components/develop/template/template_workflow.ja.mdx @@ -610,22 +610,16 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from このアプリケーションの基本情報を取得するために使用されます - ### Query - - - ユーザー識別子、開発者のルールによって定義され、アプリケーション内で一意でなければなりません。 - - ### Response - `name` (string) アプリケーションの名前 - `description` (string) アプリケーションの説明 - `tags` (array[string]) アプリケーションのタグ - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -656,14 +650,6 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from ページに入る際に、機能、入力パラメータ名、タイプ、デフォルト値などの情報を取得するために使用されます。 - ### クエリ - - - - ユーザー識別子、開発者のルールで定義され、アプリケーション内で一意でなければなりません。 - - - ### 応答 - `user_input_form` (array[object]) ユーザー入力フォームの設定 - `text-input` (object) テキスト入力コントロール @@ -697,10 +683,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty, Paragraph } from - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ``` diff --git a/web/app/components/develop/template/template_workflow.zh.mdx b/web/app/components/develop/template/template_workflow.zh.mdx index ddffc0f02d5070..40dfb863a0a6b2 100644 --- a/web/app/components/develop/template/template_workflow.zh.mdx +++ b/web/app/components/develop/template/template_workflow.zh.mdx @@ -602,22 +602,15 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等 用于获取应用的基本信息 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - ### Response - `name` (string) 应用名称 - `description` (string) 应用描述 - `tags` (array[string]) 应用标签 - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/info?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/info' \ -H 'Authorization: Bearer {api_key}' ``` @@ -648,14 +641,6 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等 用于进入页面一开始,获取功能开关、输入参数名称、类型及默认值等使用。 - ### Query - - - - 用户标识,由开发者定义规则,需保证用户标识在应用内唯一。 - - - ### Response - `user_input_form` (array[object]) 用户输入表单配置 - `text-input` (object) 文本输入控件 @@ -689,10 +674,10 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等 - + ```bash {{ title: 'cURL' }} - curl -X GET '${props.appDetail.api_base_url}/parameters?user=abc-123' \ + curl -X GET '${props.appDetail.api_base_url}/parameters' \ --header 'Authorization: Bearer {api_key}' ```