From 303bafb3ac5c6f089c8e99aa9ce6388209c78924 Mon Sep 17 00:00:00 2001 From: KVOJJJin Date: Fri, 25 Oct 2024 15:03:24 +0800 Subject: [PATCH] chore: update api docs (#9832) --- .../develop/template/template.en.mdx | 10 ++++++++-- .../develop/template/template.zh.mdx | 11 ++++++++++- .../template/template_advanced_chat.en.mdx | 18 ++++++++++++++---- .../template/template_advanced_chat.zh.mdx | 19 ++++++++++++++++--- .../develop/template/template_chat.en.mdx | 10 ++++++++-- .../develop/template/template_chat.zh.mdx | 11 ++++++++++- .../develop/template/template_workflow.en.mdx | 18 ++++++++++++++---- .../develop/template/template_workflow.zh.mdx | 18 ++++++++++++++---- 8 files changed, 94 insertions(+), 21 deletions(-) diff --git a/web/app/components/develop/template/template.en.mdx b/web/app/components/develop/template/template.en.mdx index a324bbefa8..61ecd7ae97 100755 --- a/web/app/components/develop/template/template.en.mdx +++ b/web/app/components/develop/template/template.en.mdx @@ -432,7 +432,10 @@ The text generation application offers non-session support and is ideal for tran - `number_limits` (int) Image number limit, default is 3 - `transfer_methods` (array[string]) List of transfer methods, remote_url, local_file, must choose one - `system_parameters` (object) System parameters - - `image_file_size_limit` (string) Image file upload size limit (MB) + - `file_size_limit` (int) Document upload size limit (MB) + - `image_file_size_limit` (int) Image file upload size limit (MB) + - `audio_file_size_limit` (int) Audio file upload size limit (MB) + - `video_file_size_limit` (int) Video file upload size limit (MB) @@ -484,7 +487,10 @@ The text generation application offers non-session support and is ideal for tran } }, "system_parameters": { - "image_file_size_limit": "10" + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ``` diff --git a/web/app/components/develop/template/template.zh.mdx b/web/app/components/develop/template/template.zh.mdx index e593f013c2..d193b91816 100755 --- a/web/app/components/develop/template/template.zh.mdx +++ b/web/app/components/develop/template/template.zh.mdx @@ -406,7 +406,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' - `number_limits` (int) 图片数量限制,默认 3 - `transfer_methods` (array[string]) 传递方式列表,remote_url , local_file,必选一个 - `system_parameters` (object) 系统参数 - - `image_file_size_limit` (string) 图片文件上传大小限制(MB) + - `file_size_limit` (int) 文档上传大小限制 (MB) + - `image_file_size_limit` (int) 图片文件上传大小限制(MB) + - `audio_file_size_limit` (int) 音频文件上传大小限制 (MB) + - `video_file_size_limit` (int) 视频文件上传大小限制 (MB) @@ -446,6 +449,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' "local_file" ] } + }, + "system_parameters": { + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ``` 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 655b6efce1..71fa7c1a09 100644 --- a/web/app/components/develop/template/template_advanced_chat.en.mdx +++ b/web/app/components/develop/template/template_advanced_chat.en.mdx @@ -63,8 +63,12 @@ Chat applications support session persistence, allowing previous chat history to Conversation ID, to continue the conversation based on previous chat records, it is necessary to pass the previous message's conversation_id. - File list, suitable for inputting files (images) combined with text understanding and answering questions, available only when the model supports Vision capability. - - `type` (string) Supported type: `image` (currently only supports image type) + File list, suitable for inputting files combined with text understanding and answering questions, available only when the model supports Vision capability. + - `type` (string) Supported type: + - `document` ('TXT', 'MD', 'MARKDOWN', 'PDF', 'HTML', 'XLSX', 'XLS', 'DOCX', 'CSV', 'EML', 'MSG', 'PPTX', 'PPT', 'XML', 'EPUB') + - `image` ('JPG', 'JPEG', 'PNG', 'GIF', 'WEBP', 'SVG') + - `audio` ('MP3', 'M4A', 'WAV', 'WEBM', 'AMR') + - `video` ('MP4', 'MOV', 'MPEG', 'MPGA') - `transfer_method` (string) Transfer method, `remote_url` for image URL / `local_file` for file upload - `url` (string) Image URL (when the transfer method is `remote_url`) - `upload_file_id` (string) Uploaded file ID, which must be obtained by uploading through the File Upload API in advance (when the transfer method is `local_file`) @@ -972,7 +976,10 @@ Chat applications support session persistence, allowing previous chat history to - `number_limits` (int) Image number limit, default is 3 - `transfer_methods` (array[string]) List of transfer methods, remote_url, local_file, must choose one - `system_parameters` (object) System parameters - - `image_file_size_limit` (string) Image file upload size limit (MB) + - `file_size_limit` (int) Document upload size limit (MB) + - `image_file_size_limit` (int) Image file upload size limit (MB) + - `audio_file_size_limit` (int) Audio file upload size limit (MB) + - `video_file_size_limit` (int) Video file upload size limit (MB) @@ -1024,7 +1031,10 @@ Chat applications support session persistence, allowing previous chat history to } }, "system_parameters": { - "image_file_size_limit": "10" + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ``` 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 2aa42fbb19..32dcec135b 100755 --- a/web/app/components/develop/template/template_advanced_chat.zh.mdx +++ b/web/app/components/develop/template/template_advanced_chat.zh.mdx @@ -61,8 +61,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' (选填)会话 ID,需要基于之前的聊天记录继续对话,必须传之前消息的 conversation_id。 - 上传的文件。 - - `type` (string) 支持类型:图片 `image`(目前仅支持图片格式) 。 + 文件列表,适用于传入文件结合文本理解并回答问题,仅当模型支持 Vision 能力时可用。 + - `type` (string) 支持类型: + - `document` 具体类型包含:'TXT', 'MD', 'MARKDOWN', 'PDF', 'HTML', 'XLSX', 'XLS', 'DOCX', 'CSV', 'EML', 'MSG', 'PPTX', 'PPT', 'XML', 'EPUB' + - `image` 具体类型包含:'JPG', 'JPEG', 'PNG', 'GIF', 'WEBP', 'SVG' + - `audio` 具体类型包含:'MP3', 'M4A', 'WAV', 'WEBM', 'AMR' + - `video` 具体类型包含:'MP4', 'MOV', 'MPEG', 'MPGA' - `transfer_method` (string) 传递方式: - `remote_url`: 图片地址。 - `local_file`: 上传文件。 @@ -1003,7 +1007,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' - `number_limits` (int) 图片数量限制,默认 3 - `transfer_methods` (array[string]) 传递方式列表,remote_url , local_file,必选一个 - `system_parameters` (object) 系统参数 - - `image_file_size_limit` (string) 图片文件上传大小限制(MB) + - `file_size_limit` (int) Document upload size limit (MB) + - `image_file_size_limit` (int) Image file upload size limit (MB) + - `audio_file_size_limit` (int) Audio file upload size limit (MB) + - `video_file_size_limit` (int) Video file upload size limit (MB) @@ -1043,6 +1050,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' "local_file" ] } + }, + "system_parameters": { + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ``` diff --git a/web/app/components/develop/template/template_chat.en.mdx b/web/app/components/develop/template/template_chat.en.mdx index d6dfbaaaf9..907a1ab0b4 100644 --- a/web/app/components/develop/template/template_chat.en.mdx +++ b/web/app/components/develop/template/template_chat.en.mdx @@ -1007,7 +1007,10 @@ Chat applications support session persistence, allowing previous chat history to - `number_limits` (int) Image number limit, default is 3 - `transfer_methods` (array[string]) List of transfer methods, remote_url, local_file, must choose one - `system_parameters` (object) System parameters - - `image_file_size_limit` (string) Image file upload size limit (MB) + - `file_size_limit` (int) Document upload size limit (MB) + - `image_file_size_limit` (int) Image file upload size limit (MB) + - `audio_file_size_limit` (int) Audio file upload size limit (MB) + - `video_file_size_limit` (int) Video file upload size limit (MB) @@ -1059,7 +1062,10 @@ Chat applications support session persistence, allowing previous chat history to } }, "system_parameters": { - "image_file_size_limit": "10" + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ``` diff --git a/web/app/components/develop/template/template_chat.zh.mdx b/web/app/components/develop/template/template_chat.zh.mdx index a91da81a1c..f6dc7daa1e 100644 --- a/web/app/components/develop/template/template_chat.zh.mdx +++ b/web/app/components/develop/template/template_chat.zh.mdx @@ -1017,7 +1017,10 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' - `number_limits` (int) 图片数量限制,默认 3 - `transfer_methods` (array[string]) 传递方式列表,remote_url , local_file,必选一个 - `system_parameters` (object) 系统参数 - - `image_file_size_limit` (string) 图片文件上传大小限制(MB) + - `file_size_limit` (int) 文档上传大小限制 (MB) + - `image_file_size_limit` (int) 图片文件上传大小限制(MB) + - `audio_file_size_limit` (int) 音频文件上传大小限制 (MB) + - `video_file_size_limit` (int) 视频文件上传大小限制 (MB) @@ -1057,6 +1060,12 @@ import { Row, Col, Properties, Property, Heading, SubProperty } from '../md.tsx' "local_file" ] } + }, + "system_parameters": { + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ``` diff --git a/web/app/components/develop/template/template_workflow.en.mdx b/web/app/components/develop/template/template_workflow.en.mdx index 5c712c2c29..db39e61e36 100644 --- a/web/app/components/develop/template/template_workflow.en.mdx +++ b/web/app/components/develop/template/template_workflow.en.mdx @@ -53,8 +53,12 @@ Workflow applications offers non-session support and is ideal for translation, a User identifier, used to define the identity of the end-user for retrieval and statistics. Should be uniquely defined by the developer within the application. - `files` (array[object]) Optional - File list, suitable for inputting files (images) combined with text understanding and answering questions, available only when the model supports Vision capability. - - `type` (string) Supported type: `image` (currently only supports image type) + File list, suitable for inputting files combined with text understanding and answering questions, available only when the model supports Vision capability. + - `type` (string) Supported type: + - `document` ('TXT', 'MD', 'MARKDOWN', 'PDF', 'HTML', 'XLSX', 'XLS', 'DOCX', 'CSV', 'EML', 'MSG', 'PPTX', 'PPT', 'XML', 'EPUB') + - `image` ('JPG', 'JPEG', 'PNG', 'GIF', 'WEBP', 'SVG') + - `audio` ('MP3', 'M4A', 'WAV', 'WEBM', 'AMR') + - `video` ('MP4', 'MOV', 'MPEG', 'MPGA') - `transfer_method` (string) Transfer method, `remote_url` for image URL / `local_file` for file upload - `url` (string) Image URL (when the transfer method is `remote_url`) - `upload_file_id` (string) Uploaded file ID, which must be obtained by uploading through the File Upload API in advance (when the transfer method is `local_file`) @@ -367,7 +371,10 @@ Workflow applications offers non-session support and is ideal for translation, a - `number_limits` (int) Image number limit, default is 3 - `transfer_methods` (array[string]) List of transfer methods, remote_url, local_file, must choose one - `system_parameters` (object) System parameters - - `image_file_size_limit` (string) Image file upload size limit (MB) + - `file_size_limit` (int) Document upload size limit (MB) + - `image_file_size_limit` (int) Image file upload size limit (MB) + - `audio_file_size_limit` (int) Audio file upload size limit (MB) + - `video_file_size_limit` (int) Video file upload size limit (MB) @@ -406,7 +413,10 @@ Workflow applications offers non-session support and is ideal for translation, a } }, "system_parameters": { - "image_file_size_limit": "10" + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ``` diff --git a/web/app/components/develop/template/template_workflow.zh.mdx b/web/app/components/develop/template/template_workflow.zh.mdx index d7d672fbd0..6e4b5e0a40 100644 --- a/web/app/components/develop/template/template_workflow.zh.mdx +++ b/web/app/components/develop/template/template_workflow.zh.mdx @@ -51,8 +51,12 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等 用户标识,用于定义终端用户的身份,方便检索、统计。 由开发者定义规则,需保证用户标识在应用内唯一。 - `files` (array[object]) Optional - 文件列表,适用于传入文件(图片)结合文本理解并回答问题,仅当模型支持 Vision 能力时可用。 - - `type` (string) 支持类型:图片 `image`(目前仅支持图片格式)。 + 文件列表,适用于传入文件结合文本理解并回答问题,仅当模型支持 Vision 能力时可用。 + - `type` (string) 支持类型: + - `document` 具体类型包含:'TXT', 'MD', 'MARKDOWN', 'PDF', 'HTML', 'XLSX', 'XLS', 'DOCX', 'CSV', 'EML', 'MSG', 'PPTX', 'PPT', 'XML', 'EPUB' + - `image` 具体类型包含:'JPG', 'JPEG', 'PNG', 'GIF', 'WEBP', 'SVG' + - `audio` 具体类型包含:'MP3', 'M4A', 'WAV', 'WEBM', 'AMR' + - `video` 具体类型包含:'MP4', 'MOV', 'MPEG', 'MPGA' - `transfer_method` (string) 传递方式,`remote_url` 图片地址 / `local_file` 上传文件 - `url` (string) 图片地址(仅当传递方式为 `remote_url` 时) - `upload_file_id` (string) (string) 上传文件 ID(仅当传递方式为 `local_file` 时) @@ -363,7 +367,10 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等 - `number_limits` (int) 图片数量限制,默认 3 - `transfer_methods` (array[string]) 传递方式列表,remote_url , local_file,必选一个 - `system_parameters` (object) 系统参数 - - `image_file_size_limit` (string) 图片文件上传大小限制(MB) + - `file_size_limit` (int) 文档上传大小限制 (MB) + - `image_file_size_limit` (int) 图片文件上传大小限制(MB) + - `audio_file_size_limit` (int) 音频文件上传大小限制 (MB) + - `video_file_size_limit` (int) 视频文件上传大小限制 (MB) @@ -402,7 +409,10 @@ Workflow 应用无会话支持,适合用于翻译/文章写作/总结 AI 等 } }, "system_parameters": { - "image_file_size_limit": "10" + "file_size_limit": 15, + "image_file_size_limit": 10, + "audio_file_size_limit": 50, + "video_file_size_limit": 100 } } ```