File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ operator_package/
3131| ` language ` | 算子使用的语言,当前仅支持python | python |
3232| ` raw_id ` | ** 关键字段** ,必须与 ` process.py ` 中的类名完全一致 | TestMapper |
3333| ` version ` | 语义化版本号 | 1.0.0 |
34- | ` modal ` / ` inputs ` / ` outputs ` | 支持的数据模态 (text/image/audio/video) | text |
34+ | ` vendor ` | 厂商 | datamate |
35+ | ` modal ` | 支持的数据模态 (text/image/audio/video) | text |
36+ | ` inputs ` | 输入的数据模态 (text/image/audio/video) | text |
37+ | ` outputs ` | 输出的数据模态 (text/image/audio/video) | text |
3538
3639### 2.2 算子版本更新日志 (release)
3740
@@ -49,8 +52,8 @@ release:
4952
5053` ` ` yaml
5154runtime :
52- memory : 10MB # 内存限制
53- cpu : 1000m # CPU 核心数 (m代表毫核)
55+ memory : 10485760 # 内存 单位bytes
56+ cpu : 0.05 # CPU 核心数
5457 gpu : 0.1 # GPU 卡数
5558 npu : 0.1 # NPU 卡数
5659 storage : 10MB # 存储空间
@@ -201,6 +204,23 @@ class YourOperatorName(Mapper):
201204
202205` ` `
203206
207+ 其中,sample字段包含如下参数:
208+
209+ ` ` ` json
210+ {
211+ "text": "文本内容",
212+ "data": "二进制数据",
213+ "fileName": "文件名",
214+ "fileType": "文件类型(扩展名)",
215+ "fileId": "文件ID",
216+ "filePath": "文件路径",
217+ "fileSize": "文件大小",
218+ "export_path": "导出路径信息",
219+ "ext_params": "额外扩展参数",
220+ "target_type": "目标文件类型"
221+ }
222+ ` ` `
223+
204224---
205225
206226# # 4. 算子注册 (`__init__.py`)
You can’t perform that action at this time.
0 commit comments