diff --git a/docs/MatrixOne-Intelligence/workflow api/alarm_api.md b/docs/MatrixOne-Intelligence/workflow api/alarm_api.md index 416be32..35953b4 100644 --- a/docs/MatrixOne-Intelligence/workflow api/alarm_api.md +++ b/docs/MatrixOne-Intelligence/workflow api/alarm_api.md @@ -1,8 +1,8 @@ # 告警相关 API -## 通知接收者管理 +## 通知对象 -### 创建通知接收者 +### 创建通知对象 用途:新增一个用于接收告警的联系人。 @@ -14,9 +14,9 @@ POST /alerting/receiver | 参数 | 是否必填 | 含义 | | --------------- | ------- | --------------------------------------------------------- | -| group_id | 是 | 组 ID,应该为 org_id 或 workspace_id | +| group_id | 是 | 工作区 ID(workspace_id) | | name | 是 | 接收者名称 | -| notify_type | 是 | 通知类型:0-邮件,1-短信,2-语音,3-企业微信 | +| notify_type | 是 | 通知类型:0-邮件,1-短信,2-电话语音,3-企业微信 | | status | 是 | 状态:0-禁用,1-启用 | | email | 否 | 邮箱地址(notify_type 为 0 时必填) | | phone | 否 | 电话号码(notify_type 为 1 或 2 时必填) | @@ -68,7 +68,82 @@ print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) } ``` -### 获取接收者列表 +### 获取单个通知对象详情 + +用途:根据接收者 ID 查询详细信息。 + +``` +GET /alerting/receiver?id={receiver_id} +``` + +**输入参数:** + +| 参数 | 是否必填 | 含义 | +| ---- | ------- | -------- | +| id | 是 | 接收者 ID | + +**输出参数:** + +| 参数 | 含义 | +| ------------ | --------------------------------------------------------- | +| id | 接收者 ID | +| name | 接收者名称 | +| notify_type | 通知类型:0-邮件,1-短信,2-电话语音,3-企业微信 | +| status | 状态:0-禁用,1-启用 | +| email | 邮箱地址 | +| phone | 电话号码 | +| wecom_key | 企业微信机器人密钥 | +| comment | 备注 | +| org_id | 组织 ID | +| workspace_id | 工作区 ID | +| created_at | 创建时间(时间戳) | +| updated_at | 更新时间(时间戳) | + +**示例:** + +```python +import requests +import json + +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/alerting/receiver" +headers = { + "Accept": "application/json", + "moi-key": "YOUR_MOI_KEY" +} + +params = { + "id": "receiver_id_12345" +} + +response = requests.get(url, headers=headers, params=params) +print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) +``` + +返回: + +```json +{ + "code": "OK", + "msg": "OK", + "data": { + "id": "receiver_id_12345", + "name": "邮件接收者", + "notify_type": 0, + "status": 1, + "email": "user@example.com", + "phone": "", + "wecom_key": "", + "comment": "用于接收告警邮件", + "org_id": "org_12345", + "workspace_id": "workspace_12345", + "created_at": 1640995200, + "updated_at": 1640995200 + }, + "request_id": "req_12345" +} +``` + +### 获取通知对象列表 用途:按条件分页查询接收者。 @@ -88,23 +163,40 @@ POST /alerting/receiver/list | 参数 | 是否必填 | 含义 | | ----------------- | ------- | --------------------------------------------------------- | -| group_ids | 否 | 组 ID 列表 | -| ids | 否 | 接收者 ID 列表 | -| name_keyword | 否 | 名称关键词 | -| email_keyword | 否 | 邮箱关键词 | -| phone_keyword | 否 | 电话关键词 | -| notify_types | 否 | 通知类型列表 | -| statuses | 否 | 状态列表 | -| search_keyword | 否 | 搜索关键词 | -| create_time_order | 否 | 创建时间排序:asc/desc | -| update_time_order | 否 | 更新时间排序:asc/desc | +| group_ids | 否 | 工作区 ID 列表(workspace_id 数组) | +| ids | 否 | 接收者 ID 列表,用于精确查询指定的接收者 | +| name_keyword | 否 | 名称关键词,模糊匹配接收者名称 | +| email_keyword | 否 | 邮箱关键词,模糊匹配邮箱地址 | +| phone_keyword | 否 | 电话关键词,模糊匹配电话号码 | +| notify_types | 否 | 通知类型列表:0-邮件,1-短信,2-电话语音,3-企业微信 | +| statuses | 否 | 状态列表:0-禁用,1-启用 | +| search_keyword | 否 | 搜索关键词,全局搜索接收者信息 | +| create_time_order | 否 | 创建时间排序:asc(升序)/desc(降序) | +| update_time_order | 否 | 更新时间排序:asc(升序)/desc(降序) | **输出参数:** -| 参数 | 含义 | -| ---------- | -------------- | -| receivers | 接收者列表 | -| total | 总数 | +| 参数 | 含义 | +| ---------- | --------------------------------------------------------- | +| receivers | 接收者列表,每个元素包含接收者的详细信息 | +| total | 符合条件的接收者总数 | + +**receivers 数组元素结构:** + +| 参数 | 含义 | +| ------------ | --------------------------------------------------------- | +| id | 接收者 ID | +| name | 接收者名称 | +| notify_type | 通知类型:0-邮件,1-短信,2-电话语音,3-企业微信 | +| status | 状态:0-禁用,1-启用 | +| email | 邮箱地址 | +| phone | 电话号码 | +| wecom_key | 企业微信机器人密钥 | +| comment | 备注 | +| org_id | 组织 ID | +| workspace_id | 工作区 ID | +| created_at | 创建时间(时间戳) | +| updated_at | 更新时间(时间戳) | **示例:** @@ -132,56 +224,72 @@ response = requests.post(url, headers=headers, json=body) print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) ``` -### 获取单个接收者详情 - -用途:根据接收者 ID 查询详细信息。 +返回: +```json +{ + "code": "OK", + "msg": "OK", + "data": { + "receivers": [ + { + "id": "receiver_id_12345", + "name": "邮件接收者", + "notify_type": 0, + "status": 1, + "email": "user1@example.com", + "phone": "", + "wecom_key": "", + "comment": "用于接收告警邮件", + "org_id": "org_12345", + "workspace_id": "workspace_12345", + "created_at": 1640995200, + "updated_at": 1640995200 + }, + { + "id": "receiver_id_67890", + "name": "企业微信接收者", + "notify_type": 3, + "status": 1, + "email": "", + "phone": "", + "wecom_key": "wecom_bot_key_12345", + "comment": "企业微信群告警通知", + "org_id": "org_12345", + "workspace_id": "workspace_12345", + "created_at": 1640995260, + "updated_at": 1640995260 + } + ], + "total": 15 + }, + "request_id": "req_12345" +} ``` -GET /alerting/receiver?id={receiver_id} -``` - -**输入参数:** -| 参数 | 是否必填 | 含义 | -| ---- | ------- | -------- | -| id | 是 | 接收者 ID | +**错误响应:** -**输出参数:** - -| 参数 | 含义 | -| ------------ | -------------- | -| id | 接收者 ID | -| name | 接收者名称 | -| notify_type | 通知类型 | -| status | 状态 | -| email | 邮箱地址 | -| phone | 电话号码 | -| wecom_key | 企业微信密钥 | -| comment | 备注 | -| created_at | 创建时间 | -| updated_at | 更新时间 | - -**示例:** - -```python -import requests -import json +400 参数错误: -url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/alerting/receiver" -headers = { - "Accept": "application/json", - "moi-key": "YOUR_MOI_KEY" +```json +{ + "code": "INVALID_ARGUMENT", + "msg": "参数错误:page 必须大于 0", + "request_id": "req_12345" } +``` -params = { - "id": "receiver_id_12345" -} +500 服务器内部错误: -response = requests.get(url, headers=headers, params=params) -print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) +```json +{ + "code": "INTERNAL_ERROR", + "msg": "服务器内部错误", + "request_id": "req_12345" +} ``` -### 更新通知接收者 +### 更新通知对象 用途:更新指定 ID 的接收者信息。 @@ -195,7 +303,7 @@ PUT /alerting/receiver | ------------ | ------- | --------------------------------------------------------- | | id | 是 | 接收者 ID | | name | 否 | 接收者名称 | -| notify_type | 否 | 通知类型:0-邮件,1-短信,2-语音,3-企业微信 | +| notify_type | 否 | 通知类型:0-邮件,1-短信,2-电话语音,3-企业微信 | | status | 否 | 状态:0-禁用,1-启用 | | email | 否 | 邮箱地址 | | phone | 否 | 电话号码 | @@ -232,7 +340,7 @@ response = requests.put(url, headers=headers, json=body) print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) ``` -### 删除通知接收者 +### 删除通知对象 用途:删除指定 ID 的接收者,并同步更新相关告警规则。 @@ -267,116 +375,7 @@ response = requests.delete(url, headers=headers, json=body) print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) ``` -### 获取默认通知类型 - -用途:查询系统支持的通知类型。 - -``` -POST /alerting/receiver/default_notify_types/list -``` - -**输出参数:** - -| 参数 | 含义 | -| ------------- | --------------------------------------------------------- | -| notify_types | 支持的通知类型列表:0-邮件,1-短信,2-电话,3-企业微信 | - -**示例:** - -```python -import requests -import json - -url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/alerting/receiver/default_notify_types/list" -headers = { - "Accept": "application/json", - "Content-Type": "application/json", - "moi-key": "YOUR_MOI_KEY" -} - -response = requests.post(url, headers=headers) -print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) -``` - -### 发送企业微信通知 - -用途:通过企业微信机器人发送通知消息。 - -``` -POST /alerting/receiver/wecom/notify -``` - -**输入参数:** - -| 参数 | 是否必填 | 含义 | -| --------------- | ------- | ---------------------- | -| bottoken | 是 | 企业微信机器人 Token | -| notify_content | 是 | 通知内容 | - -**输出参数:** - -| 参数 | 含义 | -| -------------- | ---------- | -| notify_result | 通知结果 | - -**示例:** - -```python -import requests -import json - -url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/alerting/receiver/wecom/notify" -headers = { - "Accept": "application/json", - "Content-Type": "application/json", - "moi-key": "YOUR_MOI_KEY" -} - -body = { - "bottoken": "YOUR_WECOM_BOT_TOKEN", - "notify_content": "告警通知:系统出现异常,请及时处理。" -} - -response = requests.post(url, headers=headers, json=body) -print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) -``` - -## 告警规则管理 - -### 获取告警默认信息列表 - -``` -POST /alerting/workspace/alert/default_info/list -``` - -**Header 参数:** - -| 参数名 | 类型 | 是否必填 | 描述 | -| -------------- | ------ | -------- | --------------------------- | -| `moi-key` | string | 是 | MOI API 密钥 | - -**输出参数:** - -| 参数 | 含义 | -| ------------------- | --------------------- | -| alert_default_infos | 告警默认信息列表 | - -**示例:** - -```python -import requests -import json - -url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/alerting/workspace/alert/default_info/list" -headers = { - "Accept": "application/json", - "Content-Type": "application/json", - "moi-key": "YOUR_MOI_KEY" -} - -response = requests.post(url, headers=headers, json={}) -print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) -``` +## 告警规则 ### 创建告警规则 @@ -396,7 +395,7 @@ POST /alerting/workspace/alert/rule/create | --------------- | ------- | --------------------------------------------------------- | | workspace_id | 是 | 工作区 ID(工作区模式下必填) | | expression_id | 是 | 表达式 ID | -| category | 是 | 类别:metric 或 event | +| category | 是 | 类别:0-metric(数据处理),1-event(数据加载) | | level | 是 | 告警级别 | | args | 否 | 参数列表 | | receivers | 否 | 接收者 ID 列表 | @@ -425,7 +424,7 @@ headers = { body = { "workspace_id": "YOUR_WORKSPACE_ID", "expression_id": "expr_12345", - "category": 1, + "category": 1, # 1-event(事件),0-metric(指标) "level": "critical", "args": [ { @@ -458,19 +457,59 @@ POST /alerting/workspace/alert/rule/list **输入参数:** -| 参数 | 是否必填 | 含义 | -| -------- | ------- | ---------- | -| filters | 否 | 过滤条件 | -| limit | 否 | 限制数量 | -| offset | 否 | 偏移量 | -| sorter | 否 | 排序条件 | +| 参数 | 是否必填 | 含义 | +| -------- | ------- | --------------------------------------------------------- | +| filters | 否 | 过滤条件,用于筛选告警规则 | +| limit | 否 | 限制返回的告警数量 | +| offset | 否 | 偏移量,用于分页查询 | +| sorter | 否 | 排序条件,指定结果排序方式 | + +**filters 参数:** + +| 参数 | 是否必填 | 含义 | +| ------------ | ------- | --------------------------------------------------------- | +| workspace_id | 否 | 工作区 ID,用于筛选指定工作区的告警规则 | +| org_id | 否 | 组织 ID,用于筛选指定组织的告警规则 | +| org_id_list | 否 | 组织 ID 列表,用于批量筛选多个组织的告警规则 | +| rule_id | 否 | 规则 ID,用于精确查询指定的告警规则 | +| alert_types | 否 | 告警类型列表,用于筛选指定类型的告警 | +| levels | 否 | 告警级别列表,用于筛选指定级别的告警 | +| states | 否 | 告警状态列表,用于筛选指定状态的告警 | +| enable | 否 | 启用状态列表,用于筛选启用/禁用的告警规则 | +| contact_id | 否 | 联系人 ID,用于筛选指定联系人的告警规则 | +| expression | 否 | 表达式关键词,用于模糊匹配告警表达式 | +| notify_types | 否 | 通知类型列表,用于筛选指定通知方式的告警 | +| intervals | 否 | 时间间隔列表,用于筛选指定间隔的告警 | + +**sorter 参数:** + +| 参数 | 是否必填 | 含义 | +| -------- | ------- | --------------------------------------------------------- | +| sort_by | 否 | 排序字段,如 "created_at"、"updated_at" 等 | +| is_desc | 否 | 是否降序排列,true-降序,false-升序 | **输出参数:** -| 参数 | 含义 | -| ------ | ---------- | -| alerts | 告警列表 | -| total | 总数 | +| 参数 | 含义 | +| ------ | --------------------------------------------------------- | +| alerts | 告警规则列表,每个元素包含告警规则的详细信息 | +| total | 符合条件的告警规则总数 | + +**alerts 数组元素结构:** + +| 参数 | 含义 | +| ----------------- | --------------------------------------------------------- | +| alert_id | 告警 ID | +| alert_config | 告警配置信息 | +| complete_expr | 完整表达式(英文) | +| complete_expr_cn | 完整表达式(中文) | +| state | 告警状态 | +| has_new | 是否有新告警 | +| silence_rule | 静默规则配置 | +| org_id | 组织 ID(工作区模式下为空) | +| workspace_id | 工作区 ID(组织模式下为空) | +| created_at | 创建时间 | +| updated_at | 更新时间 | **示例:** @@ -487,7 +526,9 @@ headers = { body = { "filters": { - "workspace_id": "YOUR_WORKSPACE_ID" + "workspace_id": "YOUR_WORKSPACE_ID", + "levels": ["critical", "warning"], + "states": ["active"] }, "limit": 10, "offset": 0, @@ -501,6 +542,73 @@ response = requests.post(url, headers=headers, json=body) print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) ``` +返回: + +```json +{ + "code": "OK", + "msg": "OK", + "data": { + "alerts": [ + { + "alert_id": "alert_12345", + "alert_config": { + "id": "config_12345", + "alert_type": "cpu_usage", + "category": 0, + "level": "critical", + "content": "CPU usage is high", + "content_cn": "CPU 使用率过高", + "expression": "cpu_usage > 80", + "expression_cn": "CPU 使用率 > 80%", + "is_default_enable": true + }, + "complete_expr": "cpu_usage > 80 for 5 minutes", + "complete_expr_cn": "CPU 使用率 > 80% 持续 5 分钟", + "state": "active", + "has_new": true, + "silence_rule": { + "enabled": false, + "resume_at": "" + }, + "org_id": "", + "workspace_id": "workspace_12345", + "created_at": "2024-01-01T10:00:00Z", + "updated_at": "2024-01-01T10:00:00Z" + }, + { + "alert_id": "alert_67890", + "alert_config": { + "id": "config_67890", + "alert_type": "memory_usage", + "category": 0, + "level": "warning", + "content": "Memory usage is high", + "content_cn": "内存使用率过高", + "expression": "memory_usage > 70", + "expression_cn": "内存使用率 > 70%", + "is_default_enable": true + }, + "complete_expr": "memory_usage > 70 for 3 minutes", + "complete_expr_cn": "内存使用率 > 70% 持续 3 分钟", + "state": "active", + "has_new": false, + "silence_rule": { + "enabled": false, + "resume_at": "" + }, + "org_id": "", + "workspace_id": "workspace_12345", + "created_at": "2024-01-01T11:00:00Z", + "updated_at": "2024-01-01T11:00:00Z" + } + ], + "total": 25 + }, + "request_id": "req_12345" +} +``` + ### 更新告警规则 ``` @@ -593,14 +701,161 @@ response = requests.post(url, headers=headers, json=body) print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) ``` -## 错误码说明 +## 告警记录 + +### 查看告警记录列表 + +用途:分页查询告警记录历史。 + +``` +POST /alerting/history/list +``` + +**输入参数:** + +| 参数 | 是否必填 | 含义 | +| ------ | ------- | --------------------------------------------------------- | +| page | 否 | 页数 | +| size | 否 | 每页显示条数 | +| filter | 否 | 过滤条件 | + +**filter 参数:** + +| 参数 | 是否必填 | 含义 | +| --------------- | ------- | --------------------------------------------------------- | +| group_id | 否 | 工作区 ID | +| start | 否 | 开始时间 | +| end | 否 | 结束时间 | +| create_at_order | 否 | 告警时间排序 | +| search_keyword | 否 | 查询关键字 | +| severity | 否 | 告警严重性 | + +**输出参数:** + +| 参数 | 含义 | +| --------- | --------------------------------------------------------- | +| total | 告警总数 | +| histories | 告警记录列表,每个元素包含告警记录的详细信息 | + +**histories 数组元素结构:** + +| 参数 | 含义 | +| ------------------- | --------------------------------------------------------- | +| id | 告警记录 ID | +| rule_id | 告警规则 ID | +| group_id | 工作区 ID | +| rule_template_id | 表达式 ID | +| rule_expression | 告警表达式(英文) | +| rule_expression_cn | 告警表达式(中文) | +| alert_type | 告警类别 | +| alert_severity | 告警严重性 | +| receivers | 通知对象列表 | +| create_at | 创建时间 | +| is_read | 是否已读 | + +**receivers 数组元素结构:** + +| 参数 | 含义 | +| ----------- | --------------------------------------------------------- | +| id | 通知对象 ID | +| name | 通知对象名称 | +| notify_type | 通知类型:0-邮件,1-短信,2-电话语音,3-企业微信 | +| email | 通知对象邮箱 | +| phone | 通知对象电话 | +| wecom_key | 企业微信机器人密钥 | + +**示例:** + +```python +import requests +import json + +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/alerting/history/list" +headers = { + "Accept": "application/json", + "Content-Type": "application/json", + "moi-key": "YOUR_MOI_KEY" +} + +body = { + "page": 1, + "size": 10, + "filter": { + "group_id": "YOUR_WORKSPACE_ID", + "start": "2024-01-01T00:00:00Z", + "end": "2024-01-31T23:59:59Z", + "severity": "critical", + "create_at_order": "desc" + } +} + +response = requests.post(url, headers=headers, json=body) +print("Response:", json.dumps(response.json(), indent=4, ensure_ascii=False)) +``` + +返回: -| 错误码 | 描述 | -| ------ | -------------- | -| OK | 成功 | -| 400 | 参数错误 | -| 401 | 认证失败 | -| 403 | 权限不足 | -| 404 | 资源不存在 | -| 409 | 资源冲突 | -| 500 | 服务器内部错误 | +```json +{ + "code": "OK", + "msg": "OK", + "data": { + "total": 25, + "histories": [ + { + "id": "history_12345", + "rule_id": "rule_12345", + "group_id": "workspace_12345", + "rule_template_id": "template_12345", + "rule_expression": "cpu_usage > 80", + "rule_expression_cn": "CPU 使用率 > 80%", + "alert_type": "cpu_usage", + "alert_severity": "critical", + "receivers": [ + { + "id": "receiver_12345", + "name": "运维团队", + "notify_type": 0, + "email": "ops@example.com", + "phone": "", + "wecom_key": "" + }, + { + "id": "receiver_67890", + "name": "企业微信群", + "notify_type": 3, + "email": "", + "phone": "", + "wecom_key": "wecom_bot_key_12345" + } + ], + "create_at": "2024-01-15T10:30:00Z", + "is_read": false + }, + { + "id": "history_67890", + "rule_id": "rule_67890", + "group_id": "workspace_12345", + "rule_template_id": "template_67890", + "rule_expression": "memory_usage > 90", + "rule_expression_cn": "内存使用率 > 90%", + "alert_type": "memory_usage", + "alert_severity": "warning", + "receivers": [ + { + "id": "receiver_12345", + "name": "运维团队", + "notify_type": 0, + "email": "ops@example.com", + "phone": "", + "wecom_key": "" + } + ], + "create_at": "2024-01-15T09:15:00Z", + "is_read": true + } + ] + }, + "request_id": "req_12345" +} +``` diff --git a/docs/MatrixOne-Intelligence/workflow api/alerting-service.json b/docs/MatrixOne-Intelligence/workflow api/alerting-service.json new file mode 100644 index 0000000..53fa1ab --- /dev/null +++ b/docs/MatrixOne-Intelligence/workflow api/alerting-service.json @@ -0,0 +1,1501 @@ +{ + "swagger": "2.0", + "info": { + "description": "Alerting service API documentation", + "title": "Alerting Service API", + "contact": { + "name": "API Support", + "url": "http://www.swagger.io/support", + "email": "support@swagger.io" + }, + "license": { + "name": "Apache 2.0", + "url": "http://www.apache.org/licenses/LICENSE-2.0.html" + }, + "version": "1.0" + }, + "host": "localhost:8010", + "basePath": "/alerting", + "paths": { + "/alerting/receiver": { + "get": { + "description": "根据接收者ID获取单个通知接收者的详细信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "获取单个接收者详情", + "parameters": [ + { + "type": "string", + "description": "接收者ID", + "name": "id", + "in": "query", + "required": true + } + ], + "responses": { + "200": { + "description": "查询成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting.Receiver" + } + } + } + ] + } + }, + "400": { + "description": "参数错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + }, + "put": { + "description": "更新指定ID的通知接收者信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "更新通知接收者", + "parameters": [ + { + "description": "更新接收者请求参数", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alerting.UpdateReceiverRequest" + } + } + ], + "responses": { + "200": { + "description": "更新成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting.IDResponse" + } + } + } + ] + } + }, + "400": { + "description": "参数错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "409": { + "description": "接收者已存在", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + }, + "post": { + "description": "创建一个新的通知接收者,用于接收告警通知", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "创建通知接收者", + "parameters": [ + { + "description": "创建接收者请求参数", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alerting.CreateReceiverRequest" + } + } + ], + "responses": { + "200": { + "description": "创建成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting.IDResponse" + } + } + } + ] + } + }, + "400": { + "description": "参数错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "409": { + "description": "接收者已存在", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + }, + "delete": { + "description": "删除指定ID的通知接收者,并更新相关告警规则", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "删除通知接收者", + "parameters": [ + { + "description": "删除接收者请求参数", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alerting.DeleteReceiverRequest" + } + } + ], + "responses": { + "200": { + "description": "删除成功", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "400": { + "description": "参数错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + } + }, + "/alerting/receiver/default_notify_types/list": { + "post": { + "description": "获取系统支持的通知类型列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "获取默认通知类型", + "responses": { + "200": { + "description": "查询成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting.ListDefaultNotifyTypesResponse" + } + } + } + ] + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + } + }, + "/alerting/receiver/list": { + "post": { + "description": "根据过滤条件分页获取通知接收者列表", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "获取接收者列表", + "parameters": [ + { + "description": "列表查询请求参数", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alerting.ListReceiverRequest" + } + } + ], + "responses": { + "200": { + "description": "查询成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting.ListReceiverResponse" + } + } + } + ] + } + }, + "400": { + "description": "参数错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + } + }, + "/alerting/receiver/multi": { + "post": { + "description": "根据多个接收者ID批量获取通知接收者的详细信息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "批量获取接收者详情", + "parameters": [ + { + "description": "批量查询请求参数", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alerting.ListMultiReceiversRequest" + } + } + ], + "responses": { + "200": { + "description": "查询成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting.ListMultiReceiversResponse" + } + } + } + ] + } + }, + "400": { + "description": "参数错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + } + }, + "/alerting/receiver/wecom/notify": { + "post": { + "description": "通过企业微信机器人发送通知消息", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "接收者管理" + ], + "summary": "发送企业微信通知", + "parameters": [ + { + "description": "企业微信通知请求参数", + "name": "request", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alerting.CreateWecomNotifyRequest" + } + } + ], + "responses": { + "200": { + "description": "发送成功", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting.CreateWecomNotifyResponse" + } + } + } + ] + } + }, + "400": { + "description": "参数错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + }, + "500": { + "description": "服务器内部错误", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + } + }, + "/alerting/workspace/alert/default_info/list": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "returns the list of alerts default infos", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "alert" + ], + "parameters": [ + { + "type": "string", + "description": "account token", + "name": "access-token", + "in": "header" + }, + { + "type": "string", + "description": "unique id of account", + "name": "uid", + "in": "header" + }, + { + "description": "json format", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/alerting-service_internal_service.ListAlertDefaultInfoRequest" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/alerting-service_internal_service.ListAlertDefaultInfoResponse" + } + } + } + ] + } + } + } + } + }, + "/alerting/workspace/alert/rule/create": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "create an alert", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "alert" + ], + "parameters": [ + { + "type": "string", + "description": "account token", + "name": "access-token", + "in": "header" + }, + { + "type": "string", + "description": "unique id of account", + "name": "uid", + "in": "header" + }, + { + "description": "json format", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/biz.CreateAlertRequest" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/biz.CreateAlertResponse" + } + } + } + ] + } + } + } + } + }, + "/alerting/workspace/alert/rule/delete": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "delete an alert", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "alert" + ], + "parameters": [ + { + "type": "string", + "description": "account token", + "name": "access-token", + "in": "header" + }, + { + "type": "string", + "description": "unique id of account", + "name": "uid", + "in": "header" + }, + { + "description": "json format", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/biz.DeleteAlertRequest" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "$ref": "#/definitions/errno.Result" + } + } + } + } + }, + "/alerting/workspace/alert/rule/list": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "returns the list of alerts", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "alert" + ], + "parameters": [ + { + "type": "string", + "description": "account token", + "name": "access-token", + "in": "header" + }, + { + "type": "string", + "description": "unique id of account", + "name": "uid", + "in": "header" + }, + { + "description": "json format", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/biz.ListAlertRequest" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/biz.ListAlertResponse" + } + } + } + ] + } + } + } + } + }, + "/alerting/workspace/alert/rule/update": { + "post": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "update an alert", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "alert" + ], + "parameters": [ + { + "type": "string", + "description": "account token", + "name": "access-token", + "in": "header" + }, + { + "type": "string", + "description": "unique id of account", + "name": "uid", + "in": "header" + }, + { + "description": "json format", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/biz.UpdateAlertRequest" + } + } + ], + "responses": { + "200": { + "description": "ok", + "schema": { + "allOf": [ + { + "$ref": "#/definitions/errno.Result" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/biz.UpdateAlertResponse" + } + } + } + ] + } + } + } + } + } + }, + "definitions": { + "alerting-service_internal_service.ListAlertDefaultInfoRequest": { + "type": "object" + }, + "alerting-service_internal_service.ListAlertDefaultInfoResponse": { + "type": "object", + "properties": { + "alert_default_infos": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.AlertDefaultInfo" + } + } + } + }, + "alerting.CreateReceiverRequest": { + "type": "object", + "required": [ + "group_id", + "name", + "notify_type", + "status" + ], + "properties": { + "comment": { + "type": "string" + }, + "email": { + "type": "string" + }, + "group_id": { + "description": "GroupID 应该为 org_id 或 workspace_id", + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string", + "minLength": 1 + }, + "notify_type": { + "description": "通知类型:0-邮件,1-短信,2-语音,3-企业微信", + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3 + ] + }, + "phone": { + "type": "string" + }, + "status": { + "description": "状态:0-禁用,1-启用", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "wecom_key": { + "type": "string" + } + } + }, + "alerting.CreateWecomNotifyRequest": { + "type": "object", + "properties": { + "bottoken": { + "type": "string" + }, + "notify_content": { + "type": "string" + } + } + }, + "alerting.CreateWecomNotifyResponse": { + "type": "object", + "properties": { + "notify_result": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "alerting.DeleteReceiverRequest": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "minLength": 1 + } + } + }, + "alerting.IDResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + } + } + }, + "alerting.ListDefaultNotifyTypesResponse": { + "type": "object", + "properties": { + "notify_types": { + "type": "array", + "items": { + "type": "integer" + } + } + } + }, + "alerting.ListMultiReceiversRequest": { + "type": "object", + "required": [ + "ids" + ], + "properties": { + "ids": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + } + }, + "alerting.ListMultiReceiversResponse": { + "type": "object", + "properties": { + "receivers": { + "type": "array", + "items": { + "$ref": "#/definitions/alerting.Receiver" + } + } + } + }, + "alerting.ListReceiverRequest": { + "type": "object", + "required": [ + "page", + "page_size" + ], + "properties": { + "page": { + "type": "integer", + "minimum": 1 + }, + "page_size": { + "type": "integer", + "minimum": 1 + }, + "receiver_filter": { + "$ref": "#/definitions/alerting.ReceiverFilter" + } + } + }, + "alerting.ListReceiverResponse": { + "type": "object", + "properties": { + "receivers": { + "type": "array", + "items": { + "$ref": "#/definitions/alerting.Receiver" + } + }, + "total": { + "type": "integer" + } + } + }, + "alerting.Receiver": { + "type": "object", + "properties": { + "comment": { + "type": "string" + }, + "created_at": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "notify_type": { + "type": "integer" + }, + "org_id": { + "type": "string" + }, + "phone": { + "type": "string" + }, + "status": { + "type": "integer" + }, + "updated_at": { + "type": "integer" + }, + "wecom_key": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "alerting.ReceiverFilter": { + "type": "object", + "properties": { + "create_time_order": { + "type": "string" + }, + "email_keyword": { + "type": "string" + }, + "group_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "ids": { + "description": "GroupIDs 应该为 org_id 或 workspace_id array", + "type": "array", + "items": { + "type": "string" + } + }, + "name_keyword": { + "type": "string" + }, + "notify_types": { + "type": "array", + "items": { + "type": "integer" + } + }, + "phone_keyword": { + "type": "string" + }, + "search_keyword": { + "type": "string" + }, + "statuses": { + "type": "array", + "items": { + "type": "integer" + } + }, + "update_time_order": { + "type": "string" + } + } + }, + "alerting.UpdateReceiverRequest": { + "type": "object", + "required": [ + "id" + ], + "properties": { + "comment": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "string", + "minLength": 1 + }, + "name": { + "type": "string" + }, + "notify_type": { + "description": "通知类型:0-邮件,1-短信,2-语音,3-企业微信", + "type": "integer", + "enum": [ + 0, + 1, + 2, + 3 + ] + }, + "phone": { + "type": "string" + }, + "status": { + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "wecom_key": { + "type": "string" + } + } + }, + "biz.Alert": { + "type": "object", + "properties": { + "alert_config": { + "$ref": "#/definitions/biz.AlertDefaultInfo" + }, + "alert_id": { + "type": "string" + }, + "complete_expr": { + "type": "string" + }, + "complete_expr_cn": { + "type": "string" + }, + "created_at": { + "type": "string" + }, + "has_new": { + "type": "boolean" + }, + "org_id": { + "description": "if in workspace mode, OrgID is empty", + "type": "string" + }, + "silence_rule": { + "$ref": "#/definitions/biz.SilenceRule" + }, + "state": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "workspace_id": { + "description": "if in org mode, WorkspaceID is empty", + "type": "string" + } + } + }, + "biz.AlertContact": { + "type": "object", + "properties": { + "comment": { + "type": "string" + }, + "email": { + "type": "string" + }, + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "org_id": { + "type": "string" + }, + "sms": { + "type": "string" + }, + "state": { + "type": "string" + }, + "tel": { + "type": "string" + }, + "workspace_id": { + "type": "string" + } + } + }, + "biz.AlertDefaultInfo": { + "type": "object", + "properties": { + "alert_type": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.ArgsUnit" + } + }, + "category": { + "type": "integer" + }, + "content": { + "type": "string" + }, + "content_cn": { + "type": "string" + }, + "expression": { + "type": "string" + }, + "expression_cn": { + "type": "string" + }, + "expression_id": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_default_enable": { + "type": "boolean" + }, + "level": { + "type": "string" + }, + "notification": { + "$ref": "#/definitions/biz.NotificationInfo" + } + } + }, + "biz.AlertInterval": { + "type": "object", + "properties": { + "unit": { + "type": "string" + }, + "value": { + "type": "integer" + } + } + }, + "biz.ArgsUnit": { + "type": "object", + "properties": { + "constraints": { + "$ref": "#/definitions/biz.Constraints" + }, + "key": { + "type": "string" + }, + "value": { + "type": "string" + } + } + }, + "biz.Constraints": { + "type": "object", + "properties": { + "is_left_interval_closed": { + "type": "boolean" + }, + "is_right_interval_closed": { + "type": "boolean" + }, + "max": { + "type": "string" + }, + "min": { + "type": "string" + } + } + }, + "biz.CreateAlertRequest": { + "type": "object", + "properties": { + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.ArgsUnit" + } + }, + "category": { + "description": "metric or event", + "type": "integer" + }, + "expression_id": { + "type": "string" + }, + "level": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": { + "type": "string" + } + }, + "repeat_interval": { + "type": "integer" + }, + "silence_rule": { + "$ref": "#/definitions/biz.SilenceRule" + }, + "workspace_id": { + "description": "if in workspace mode, workspace_id is required", + "type": "string" + } + } + }, + "biz.CreateAlertResponse": { + "type": "object", + "properties": { + "alert_id": { + "type": "string" + } + } + }, + "biz.DeleteAlertRequest": { + "type": "object", + "properties": { + "alert_id": { + "type": "string" + } + } + }, + "biz.ListAlertFilter": { + "type": "object", + "properties": { + "alert_types": { + "type": "array", + "items": { + "type": "string" + } + }, + "contact_id": { + "type": "string" + }, + "enable": { + "type": "array", + "items": { + "type": "boolean" + } + }, + "expression": { + "type": "string" + }, + "intervals": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.AlertInterval" + } + }, + "levels": { + "type": "array", + "items": { + "type": "string" + } + }, + "notify_types": { + "type": "array", + "items": { + "type": "string" + } + }, + "org_id": { + "type": "string" + }, + "org_id_list": { + "type": "array", + "items": { + "type": "string" + } + }, + "rule_id": { + "type": "string" + }, + "states": { + "type": "array", + "items": { + "type": "string" + } + }, + "workspace_id": { + "type": "string" + } + } + }, + "biz.ListAlertRequest": { + "type": "object", + "properties": { + "filters": { + "$ref": "#/definitions/biz.ListAlertFilter" + }, + "limit": { + "type": "integer" + }, + "offset": { + "type": "integer" + }, + "sorter": { + "$ref": "#/definitions/biz.ListAlertSorter" + } + } + }, + "biz.ListAlertResponse": { + "type": "object", + "properties": { + "alerts": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.Alert" + } + }, + "total": { + "type": "integer" + } + } + }, + "biz.ListAlertSorter": { + "type": "object", + "properties": { + "is_desc": { + "type": "boolean" + }, + "sort_by": { + "type": "string" + } + } + }, + "biz.NotificationInfo": { + "type": "object", + "properties": { + "interval": { + "$ref": "#/definitions/biz.AlertInterval" + }, + "notify_rules": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.NotifyRule" + } + } + } + }, + "biz.NotifyRule": { + "type": "object", + "properties": { + "alert_contacts": { + "description": "Deprecated: use AlertObjects instead", + "type": "array", + "items": { + "$ref": "#/definitions/biz.AlertContact" + } + }, + "alert_objects": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.AlertContact" + } + }, + "type": { + "type": "string" + } + } + }, + "biz.SilenceRule": { + "type": "object", + "properties": { + "enabled": { + "description": "true表示静默", + "type": "boolean" + }, + "resume_at": { + "type": "string" + } + } + }, + "biz.UpdateAlertRequest": { + "type": "object", + "required": [ + "alert_id" + ], + "properties": { + "alert_id": { + "type": "string" + }, + "args": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.ArgsUnit" + } + }, + "level": { + "type": "string" + }, + "receivers": { + "type": "array", + "items": { + "type": "string" + } + }, + "repeat_interval": { + "type": "integer" + }, + "silence_rule": { + "$ref": "#/definitions/biz.SilenceRule" + } + } + }, + "biz.UpdateAlertResponse": { + "type": "object" + }, + "errno.Result": { + "type": "object", + "properties": { + "code": { + "description": "error code", + "type": "string" + }, + "data": { + "description": "data returned on success" + }, + "msg": { + "description": "error description", + "type": "string" + }, + "request_id": { + "description": "unique RequestID of the current request", + "type": "string" + } + } + }, + "internal_service.ListAlertDefaultInfoRequest": { + "type": "object" + }, + "internal_service.ListAlertDefaultInfoResponse": { + "type": "object", + "properties": { + "alert_default_infos": { + "type": "array", + "items": { + "$ref": "#/definitions/biz.AlertDefaultInfo" + } + } + } + } + } +} \ No newline at end of file diff --git a/docs/MatrixOne-Intelligence/workflow api/data_explore_api_v2.md b/docs/MatrixOne-Intelligence/workflow api/data_explore_api_v2.md index d7896fc..9363f16 100644 --- a/docs/MatrixOne-Intelligence/workflow api/data_explore_api_v2.md +++ b/docs/MatrixOne-Intelligence/workflow api/data_explore_api_v2.md @@ -1037,18 +1037,29 @@ print(requests.post(url, headers=headers, json=body).json()) 用途:获取文件的块数据,支持数据增强结果和普通嵌入块数据两种模式。 ``` -POST /catalog/file/blocks +POST /byoa/api/v1/explore/volumes/{vid}/files/{fid}/blocks ``` -**Body 输入参数:** +**路径参数:** + +| 参数 | 是否必填 | 类型 | 含义 | +| ---- | -------- | ------ | ------ | +| vid | 是 | string | 卷 ID | +| fid | 是 | string | 文件 ID | + +**请求头:** + +| 参数 | 是否必填 | 类型 | 含义 | +| -------- | -------- | ------ | ------- | +| moi-key | 是 | string | API Key | -| 参数 | 是否必填 | 类型 | 含义 | -| ------- | -------- | ------ | ------ | -| file_id | 是 | string | 文件 ID | -| volume_id | 是 | string | 卷 ID | -| filters | 否 | object | 过滤条件 | -| offset | 否 | integer | 偏移量(默认 0) | -| limit | 否 | integer | 限制数量(默认 30) | +**Body 输入参数(可选):** + +| 参数 | 类型 | 含义 | +| ------- | ------- | ------------------------ | +| filters | object | 过滤条件 | +| offset | integer | 偏移量(默认 0) | +| limit | integer | 限制数量(默认 30) | **Filters 对象结构:** @@ -1066,13 +1077,11 @@ POST /catalog/file/blocks ```python import requests -url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/catalog/file/blocks" +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/explore/volumes/vol-abc/files/file-xyz/blocks" headers = { "moi-key": "xxxxx" } body = { - "file_id": "file-xyz", - "volume_id": "vol-abc", "offset": 0, "limit": 30 } @@ -1083,13 +1092,11 @@ print(requests.post(url, headers=headers, json=body).json()) ```python import requests -url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/catalog/file/blocks" +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/explore/volumes/vol-abc/files/file-xyz/blocks" headers = { "moi-key": "xxxxx" } body = { - "file_id": "file-xyz", - "volume_id": "vol-abc", "filters": { "types": ["text", "table"], "search_content": "关键词", @@ -1105,35 +1112,37 @@ print(requests.post(url, headers=headers, json=body).json()) ```json { - "code": "OK", - "msg": "OK", + "code": "ok", + "msg": "ok", "data": { "total": 25, "type": 0, "items": [ { - "block_id": "block-123", + "id": "block-123", "content": "这是文档的一个文本块内容...", "type": "text", - "level": "paragraph", - "position": { - "page": 1, - "start": 0, - "end": 100 - }, - "embedding": [0.1, 0.2, 0.3, ...] + "content_type": "text", + "file_id": "file-xyz", + "description": "段落内容", + "created_at": "2025-02-13T12:00:00Z", + "updated_at": "2025-02-13T12:00:00Z", + "text_and_image_id": null, + "image_process_type": null, + "level": "paragraph" }, { - "block_id": "block-124", + "id": "block-124", "content": "这是另一个文本块内容...", "type": "text", - "level": "paragraph", - "position": { - "page": 1, - "start": 100, - "end": 200 - }, - "embedding": [0.4, 0.5, 0.6, ...] + "content_type": "text", + "file_id": "file-xyz", + "description": "段落内容", + "created_at": "2025-02-13T12:01:00Z", + "updated_at": "2025-02-13T12:01:00Z", + "text_and_image_id": null, + "image_process_type": null, + "level": "paragraph" } ] } diff --git a/docs/MatrixOne-Intelligence/workflow api/data_export_api.md b/docs/MatrixOne-Intelligence/workflow api/data_export_api.md index abd9480..5ff979f 100644 --- a/docs/MatrixOne-Intelligence/workflow api/data_export_api.md +++ b/docs/MatrixOne-Intelligence/workflow api/data_export_api.md @@ -12,38 +12,76 @@ POST /export/task/create ``` +**请求头:** + +| 参数 | 是否必填 | 类型 | 含义 | +| -------- | -------- | ------ | ------ | +| moi-key | 是 | string | API Key | + **输入参数:** -| 参数 | 是否必填 |含义| -| --------------- | ------- |---- | -| task_name | 是 | 任务名称| -| creator | 是 | 创建者| -| connector_id | 是 | 连接器 ID| -| connector_name | 是 | 连接器名称| -| type | 是 | 任务类型| -| config | 是 | 导出配置对象| -|     dify_config | 是 | Dify 配置对象| -|         dataset_id | 是 | 数据集 ID| -|         dataset_name | 是 | 数据集名称| -|         embedding_model | 是 | 嵌入模型| -|     mo_config | 否 | MatrixOne 导出配置对象| -|         database_name | 是 | 数据库名| -|         table_name | 是 | 表名| -|         new_table | 否 | 是否新建表,默认 false| -|         column | 是 | 列配置对象| -|             export_column | 是 | 字段映射列表| -|                 source_column | 是 | 源字段名| -|                 mapping_column | 是 | 目标字段名| -|             combine_column | 是 | 需要合并的字段名列表| -|         duplicated_strategy | 是 | 重复数据处理策略(整数)| -|     merge_title_to_text | 否 | 是否将标题合并到文本,默认 false| -| files | 是 | 文件列表| -|     file_id | 是 | 文件 ID| -|     full_path | 是 | 文件完整路径数组| - -提示:如果仅导出到 Dify,可只提供 `dify_config`;导出到 MatrixOne 时,需要提供 `mo_config` 并按要求配置列映射与重复策略。 +| 参数 | 是否必填 | 类型 | 含义 | +| ---------------------------------- | ------- | ------- | ---------------------------- | +| task_name | 是 | string | 任务名称 | +| creator | 是 | string | 创建者 | +| connector_id | 是 | integer | 连接器 ID | +| connector_name | 是 | string | 连接器名称 | +| type | 是 | integer | 任务类型 | +| config | 是 | object | 导出配置对象 | +|     dify_config| 否 | object | Dify 配置对象 | +|     s3_config | 否 | object | OSS 和 S3 的导出配置 | +|     mo_config | 否 | object | MatrixOne 导出配置对象 | +|     merge_title_to_text| 否 | boolean | 是否将标题合并到文本,默认 false | +| files | 是 | array | 文件列表 | +|     file_id | 是 | string | 文件 ID | +|     full_path | 是 | array | 文件完整路径数组 | +|     is_raw | 是 | boolean | 是否为原始文件 | -**示例:** +Config 对象详细结构 + +#### dify_config 对象 + +| 参数 | 是否必填 | 类型 | 含义 | +| -------------- | ------- | ------ | --------- | +| dataset_id | 是 | string | 数据集 ID | +| dataset_name | 是 | string | 数据集名称 | +| embedding_model| 是 | string | 嵌入模型 | + +#### s3_config 对象 + +| 参数 | 是否必填 | 类型 | 含义 | +| -------------- | ------- | ------- | ------------------- | +| path | 是 | string | 导出的文件夹地址 | +| need_compress | 否 | boolean | 是否需要压缩,默认 false | +| compress_method| 否 | string | 压缩方式 | + +#### mo_config 对象 + +| 参数 | 是否必填 | 类型 | 含义 | +| ------------------ | ------- | ------- | ----------------------- | +| database_name | 是 | string | 数据库名 | +| table_name | 是 | string | 表名 | +| new_table | 否 | boolean | 是否新建表,默认 false | +| column | 是 | object | 列配置对象 | +|     export_column | 是 | array | 字段映射列表 | +|         source_column | 是 | string | 源字段名 | +|         mapping_column | 是 | string | 目标字段名 | +|     combine_column | 是 | array | 需要合并的字段名列表 | +| duplicated_strategy| 是 | integer | 重复数据处理策略(整数) | + +**使用说明:** + +- 导出到 Dify:提供 `dify_config` 配置 + +- 导出到 S3/OSS:提供 `s3_config` 配置 + +- 导出到 MatrixOne:提供 `mo_config` 配置并设置列映射与重复策略 + +- 可以同时配置多个导出目标 + +**示例 (Python):** + +导出到 Dify 示例: ```python import requests @@ -54,33 +92,117 @@ headers = { } body = { - "task_name": "测试导出任务", + "task_name": "导出到 Dify 任务", "creator": "admin", "connector_id": 1, "connector_name": "Dify 连接器", "type": 1, - "config": { - "dify_config": { - "dataset_id": "dataset_123", - "dataset_name": "测试数据集", - "embedding_model": "text-embedding-ada-002" - }, - "merge_title_to_text": False - }, + "config": { + "dify_config": { + "dataset_id": "dataset_123", + "dataset_name": "测试数据集", + "embedding_model": "text-embedding-ada-002" + }, + "merge_title_to_text": false + }, "files": [ { "file_id": "file_456", - "full_path": ["/data", "documents", "test.pdf"] + "full_path": ["data", "documents", "test.pdf"], + "is_raw": false } ] } response = requests.post(url, json=body, headers=headers) +print(response.json()) +``` -if response.status_code == 200: - print(response.json()) -else: - print(f"请求失败,状态码:{response.status_code}, 错误信息:{response.text}") +导出到 S3/OSS 示例: + +```python +import requests + +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/export/task/create" +headers = { + "moi-key": "xxxxx" +} + +body = { + "task_name": "导出到 S3 任务", + "creator": "admin", + "connector_id": 2, + "connector_name": "S3 连接器", + "type": 2, + "config": { + "s3_config": { + "path": "/export/data/", + "need_compress": true, + "compress_method": "zip" + } + }, + "files": [ + { + "file_id": "file_789", + "full_path": ["data", "processed", "result.json"], + "is_raw": false + } + ] +} + +response = requests.post(url, json=body, headers=headers) +print(response.json()) +``` + +导出到 MatrixOne 示例: + +```python +import requests + +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/export/task/create" +headers = { + "moi-key": "xxxxx" +} + +body = { + "task_name": "导出到 MatrixOne 任务", + "creator": "admin", + "connector_id": 3, + "connector_name": "MatrixOne 连接器", + "type": 3, + "config": { + "mo_config": { + "database_name": "test_db", + "table_name": "documents", + "new_table": true, + "column": { + "export_column": [ + { + "source_column": "content", + "mapping_column": "doc_content" + }, + { + "source_column": "title", + "mapping_column": "doc_title" + } + ], + "combine_column": ["content", "title"] + }, + "duplicated_strategy": 1 + }, + "merge_title_to_text": false + }, + "files": [ + { + "file_id": "file_101", + "full_path": ["data", "documents", "report.pdf"], + "is_raw": false + } + ] +} + +response = requests.post(url, json=body, headers=headers) +print(response.json()) ``` **返回:** @@ -99,33 +221,39 @@ else: POST /export/task/list ``` +**请求头:** + +| 参数 | 是否必填 | 类型 | 含义 | +| -------- | -------- | ------ | ------- | +| moi-key | 是 | string | API Key | + **输入参数:** -| 参数 | 数据类型 | 是否必填 |含义 | 默认值 | -| --------------- | ---- | ---- | ---- | ---- | -| offset |int |否 |分页偏移量 |0 | -| limit |int |否 |分页限制 |10 | -| statuses |array |否 |任务状态列表 | | -| creator |string |否 |任务创建用户 | | -| connector_name |string |否 |连接器名称 | | -| task_id |string |否 |任务 ID | | -| order_by |string |否 |排序字段 |created_at | -| order_direction |string |否 |排序方向 |desc | +| 参数 | 数据类型 | 是否必填 | 含义 | 默认值 | +| --------------- | ------- | ------- | ------------ | ---------- | +| offset | int | 否 | 分页偏移量 | 0 | +| limit | int | 否 | 分页限制 | 10 | +| statuses | array | 否 | 任务状态列表 | | +| creator | string | 否 | 任务创建用户 | | +| connector_name | string | 否 | 连接器名称 | | +| task_id | string | 否 | 任务 ID | | +| order_by | string | 否 | 排序字段 | created_at | +| order_direction | string | 否 | 排序方向 | desc | **输出参数:** -| 参数 | 含义 | -| --------------- | ---- | -| tasks |导出任务列表 | -|     id | 任务 ID | -|     name | 任务名称 | -|     connector_name | 连接器名称 | -|     type | 任务类型 | -|     status | 任务状态 | -|     export_source | 导出源 | -|     create_time | 创建时间 | -|     end_time | 结束时间 | -| total | 总数量 | +| 参数 | 含义 | +| ---------------------------------- | ------------ | +| tasks | 导出任务列表 | +|     id | 任务 ID | +|     name | 任务名称 | +|     connector_name | 连接器名称 | +|     type | 任务类型 | +|     status | 任务状态 | +|     export_source | 导出源 | +|     create_time | 创建时间 | +|     end_time | 结束时间 | +| total | 总数量 | **示例:** @@ -182,29 +310,44 @@ print("Response Body:", json.dumps(response.json(), indent=4, ensure_ascii=False POST /export/task/info ``` +**请求头:** + +| 参数 | 是否必填 | 类型 | 含义 | +| -------- | -------- | ------ | ------- | +| moi-key | 是 | string | API Key | + **输入参数:** -| 参数 | 是否必填 |含义| -| --------------- | ------- |---- | -| id | 是 | 任务 ID | +| 参数 | 是否必填 | 类型 | 含义 | +| ---- | ------- | ------ | ------- | +| id | 是 | string | 任务 ID | **输出参数:** -| 参数 | 含义 | -| --------------- | ---- | -| id |任务 ID | -| name | 任务名称 | -| creator | 创建者 | -| connector_name | 连接器名称 | -| type | 任务类型 | -| status | 任务状态 | -| config | 导出配置 | -|     dify_config | Dify 配置对象 | -|         dataset_id | 数据集 ID | -|         dataset_name | 数据集名称 | -|         embedding_model | 嵌入模型 | -| create_time | 创建时间 | -| end_time | 结束时间 | +| 参数 | 含义 | +| ---------------------------------- | ------------------------ | +| id | 任务 ID | +| name | 任务名称 | +| creator | 创建者 | +| connector_name | 连接器名称 | +| type | 任务类型 | +| status | 任务状态 | +| config | 导出配置 | +|     dify_config| Dify 配置对象 | +|         dataset_id | 数据集 ID | +|         dataset_name | 数据集名称 | +|         embedding_model | 嵌入模型 | +|     merge_title_to_text| 是否合并标题 | +| create_time | 创建时间 | +| end_time | 结束时间 | +| file_stats | 文件导出状态 | +|     total | 总数 | +|     pending | 等待中 | +|     running | 运行中 | +|     failed | 失败 | +|     completed | 完成 | +| fileSuccess| 成功总数 | +| fileFail | 失败总数 | **示例:** @@ -233,21 +376,31 @@ print("Response Body:", json.dumps(response.json(), indent=4, ensure_ascii=False "code": "ok", "msg": "ok", "data": { - "id": "string", - "name": "string", - "creator": "string", - "connector_name": "string", + "id": "task_123", + "name": "导出到 Dify 任务", + "creator": "admin", + "connector_name": "Dify 连接器", "type": 1, "status": 2, - "config": { - "dify_config": { - "dataset_id": "string", - "dataset_name": "string", - "embedding_model": "string" - } - }, + "config": { + "dify_config": { + "dataset_id": "dataset_123", + "dataset_name": "测试数据集", + "embedding_model": "text-embedding-ada-002" + }, + "merge_title_to_text": false + }, "create_time": "2024-01-01T00:00:00Z", - "end_time": "2024-01-01T01:00:00Z" + "end_time": "2024-01-01T01:00:00Z", + "file_stats": { + "total": 100, + "pending": 10, + "running": 20, + "failed": 5, + "completed": 65, + "fileSuccess": 65, + "fileFail": 5 + } } } ``` @@ -258,30 +411,41 @@ print("Response Body:", json.dumps(response.json(), indent=4, ensure_ascii=False POST /export/task/files ``` +**请求头:** + +| 参数 | 是否必填 | 类型 | 含义 | +| -------- | -------- | ------ | ------- | +| moi-key | 是 | string | API Key | + **输入参数:** -| 参数 | 数据类型 | 是否必填 |含义 | 默认值 | -| --------------- | ---- | ---- | ---- | ---- | -| offset |int |否 |分页偏移量 |0 | -| limit |int |否 |分页限制 |10 | -| task_id |string |是 |任务 ID | | -| statuses |array |否 |文件状态列表 | | -| order_by |string |否 |排序字段 |created_at | -| order_direction |string |否 |排序方向 |desc | +| 参数 | 数据类型 | 是否必填 | 含义 | 默认值 | +| --------------- | ------- | ------- | ------------ | ---------- | +| offset | int | 否 | 分页偏移量 | 0 | +| limit | int | 否 | 分页限制 | 10 | +| task_id | string | 是 | 任务 ID | | +| statuses | array | 否 | 文件状态列表 | | +| order_by | string | 否 | 排序字段 | created_at | +| order_direction | string | 否 | 排序方向 | desc | **输出参数:** -| 参数 | 含义 | -| --------------- | ---- | -| files |文件列表 | -|     id | 文件 ID | -|     status | 文件状态 | -|     full_path | 文件完整路径 | -|     details | 详细信息 | -|     create_time | 创建时间 | -|     start_time | 开始时间 | -|     end_time | 结束时间 | -| total | 总数量 | +| 参数 | 含义 | +| ---------------------------------- | ---------------- | +| files | 文件列表 | +|     id | 文件 ID | +|     status | 文件状态 | +|     full_path | 文件完整路径 | +|     details | 详细信息 | +|     create_time| 创建时间 | +|     start_time | 开始时间 | +|     end_time | 结束时间 | +|     file_name | 文件名 | +|     file_type | 文件类型 | +| total | 总数量 | +| total_failure | 导出失败的文件数 | +| total_files | 导出总文件数 | +| total_success | 导出成功文件数 | **示例:** @@ -317,47 +481,65 @@ print("Response Body:", json.dumps(response.json(), indent=4, ensure_ascii=False "data": { "files": [ { - "id": "string", + "id": "file_123", "status": 2, - "full_path": ["string"], - "details": "string", + "full_path": ["data", "documents", "test.pdf"], + "details": "导出成功", "create_time": "2024-01-01T00:00:00Z", "start_time": "2024-01-01T00:00:00Z", - "end_time": "2024-01-01T01:00:00Z" + "end_time": "2024-01-01T01:00:00Z", + "file_name": "test.pdf", + "file_type": 1 + }, + { + "id": "file_124", + "status": 3, + "full_path": ["data", "documents", "report.docx"], + "details": "导出失败:文件格式不支持", + "create_time": "2024-01-01T00:05:00Z", + "start_time": "2024-01-01T00:05:00Z", + "end_time": "2024-01-01T00:06:00Z", + "file_name": "report.docx", + "file_type": 2 } ], - "total": 1 + "total": 50, + "total_failure": 5, + "total_files": 50, + "total_success": 45 } } ``` -### 删除导出任务 +### 导出失败重试 ``` -POST /export/task/delete +POST /export/task/{task_id}/rerun ``` -**输入参数:** +**请求头:** -| 参数 | 是否必填 |含义| -| --------------- | ------- |---- | -| id | 是 | 任务 ID | +| 参数 | 是否必填 | 类型 | 含义 | +| -------- | -------- | ------ | ------- | +| moi-key | 是 | string | API Key | + +**路径参数:** + +| 参数 | 是否必填 | 类型 | 含义 | +| ------- | ------- | ------ | ----------- | +| task_id | 是 | string | 导出任务 ID | **示例:** ```python import requests -url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/export/task/delete" +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/export/task/task_123/rerun" headers = { "moi-key": "xxxxx" } -body = { - "id": "task_123" -} - -response = requests.post(url, json=body, headers=headers) +response = requests.post(url, headers=headers) if response.status_code == 200: print(response.json()) @@ -375,76 +557,44 @@ else: } ``` -## 数据卷文件管理 - -### 查询数据卷文件列表(导出用) +### 删除导出任务 ``` -POST /export/volumes/{vid}/files +POST /export/task/delete ``` -**路径参数:** +**请求头:** -| 参数 | 是否必填 |含义| -| --------------- | ------- |---- | -| vid | 是 | 数据卷 ID | +| 参数 | 是否必填 | 类型 | 含义 | +| -------- | -------- | ------ | ------- | +| moi-key | 是 | string | API Key | **输入参数:** -| 参数 | 数据类型 | 是否必填 |含义 | 默认值 | -| --------------- | ---- | ---- | ---- | ---- | -| filters |object |否 |过滤条件对象 | | -|     types |array |否 |文件类型列表 | | -|     status |array |否 |文件状态列表 | | -|     exclude_status |array |否 |排除的状态列表 | | -| sorter |object |否 |排序设置对象 | | -|     sort_by |string |否 |排序字段 |created_at | -|     is_desc |boolean |否 |是否降序 |true | -| offset |int |否 |分页偏移量 |0 | -| limit |int |否 |分页限制 |30 | -| task_id |string |否 |任务 ID | | - -**输出参数:** - -| 参数 | 含义 | -| --------------- | ---- | -| total |总数量 | -| items | 文件列表 | -|     user_id | 用户 ID | -|     id | 文件 ID | -|     file_name | 文件名称 | -|     file_status | 文件状态 | -|     file_type | 文件类型 | +| 参数 | 是否必填 | 类型 | 含义 | +| ---- | ------- | ------ | ------- | +| id | 是 | string | 任务 ID | **示例:** ```python import requests -import json -vid = "volume_123" -url = f"https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/export/volumes/{vid}/files" +url = "https://freetier-01.cn-hangzhou.cluster.matrixonecloud.cn/byoa/api/v1/export/task/delete" headers = { "moi-key": "xxxxx" } body = { - "filters": { - "types": [1, 2], - "status": [1, 2], - "exclude_status": [3, 4] - }, - "sorter": { - "sort_by": "created_at", - "is_desc": True - }, - "offset": 0, - "limit": 30 + "id": "task_123" } response = requests.post(url, json=body, headers=headers) -print("Response Body:", json.dumps(response.json(), indent=4, ensure_ascii=False)) +if response.status_code == 200: + print(response.json()) +else: + print(f"请求失败,状态码:{response.status_code}, 错误信息:{response.text}") ``` **返回:** @@ -453,17 +603,6 @@ print("Response Body:", json.dumps(response.json(), indent=4, ensure_ascii=False { "code": "ok", "msg": "ok", - "data": { - "total": 10, - "items": [ - { - "user_id": "string", - "id": "string", - "file_name": "string", - "file_status": 2, - "file_type": 1 - } - ] - } + "data": null } -``` +``` \ No newline at end of file diff --git a/docs/MatrixOne-Intelligence/workflow api/workflow-be.json b/docs/MatrixOne-Intelligence/workflow api/workflow-be.json deleted file mode 100644 index 6c56dcb..0000000 --- a/docs/MatrixOne-Intelligence/workflow api/workflow-be.json +++ /dev/null @@ -1,10450 +0,0 @@ -{ - "openapi": "3.1.0", - "info": { - "title": "Bring Your Own Agent", - "description": "Bring Your Own Agent", - "license": { - "name": "Apache 2.0", - "url": "https://www.apache.org/licenses/LICENSE-2.0.html" - }, - "version": "0.0.1" - }, - "paths": { - "/byoa/ping": { - "get": { - "summary": "Pong", - "description": "Health check", - "operationId": "pong_byoa_ping_get", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "user_id", - "title": "User-Id" - } - }, - { - "name": "x-mdc-username", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "user_name", - "title": "X-Mdc-Username" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/internal/init_tables": { - "get": { - "tags": [ - "internal" - ], - "summary": "Init Tables", - "description": "Initialize tables, when running for the first time", - "operationId": "init_tables_byoa_api_v1_internal_init_tables_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/byoa/api/v1/workflow_job": { - "get": { - "tags": [ - "workflow_job" - ], - "summary": "List Jobs", - "description": "获取作业列表", - "operationId": "list_jobs_byoa_api_v1_workflow_job_get", - "parameters": [ - { - "name": "workflow_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "name_search", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "工作流名称/源数据卷名称/目标数据卷名称搜索", - "title": "Name Search" - }, - "description": "工作流名称/源数据卷名称/目标数据卷名称搜索" - }, - { - "name": "file_types", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "文件类型", - "title": "File Types" - }, - "description": "文件类型" - }, - { - "name": "priority", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "优先级", - "title": "Priority" - }, - "description": "优先级" - }, - { - "name": "page_num", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "页码", - "default": 1, - "title": "Page Num" - }, - "description": "页码" - }, - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "每页大小", - "default": 10, - "title": "Page Size" - }, - "description": "每页大小" - }, - { - "name": "count_le", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "小于等于的文件数量", - "title": "Count Le" - }, - "description": "小于等于的文件数量" - }, - { - "name": "count_ge", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "大于等于的文件数量", - "title": "Count Ge" - }, - "description": "大于等于的文件数量" - }, - { - "name": "sort_field", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "排序字段,如果没有设置,按创建时间降序", - "title": "Sort Field" - }, - "description": "排序字段,如果没有设置,按创建时间降序" - }, - { - "name": "sort_order", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "排序顺序,默认升序", - "title": "Sort Order" - }, - "description": "排序顺序,默认升序" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_IndexWorkflowJobListResponseData_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "tags": [ - "workflow_job" - ], - "summary": "Create Job", - "description": "创建作业", - "operationId": "create_job_byoa_api_v1_workflow_job_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobCreateRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/IndexWorkflowJobCreateResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_job/{job_id}": { - "get": { - "tags": [ - "workflow_job" - ], - "summary": "Get Job Detail", - "description": "获取作业详情", - "operationId": "get_job_detail_byoa_api_v1_workflow_job__job_id__get", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "作业ID", - "title": "Job Id" - }, - "description": "作业ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_IndexWorkflowJobListItem_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_job/{job_id}/files": { - "get": { - "tags": [ - "workflow_job" - ], - "summary": "Get Job Files", - "description": "获取作业关联的文件列表", - "operationId": "get_job_files_byoa_api_v1_workflow_job__job_id__files_get", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "作业ID", - "title": "Job Id" - }, - "description": "作业ID" - }, - { - "name": "page_num", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "页码", - "default": 1, - "title": "Page Num" - }, - "description": "页码" - }, - { - "name": "page_size", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "每页大小", - "default": 10, - "title": "Page Size" - }, - "description": "每页大小" - }, - { - "name": "statuses", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "文件状态筛选", - "default": [], - "title": "Statuses" - }, - "description": "文件状态筛选" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_IndexWorkflowJobFileListData_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "tags": [ - "workflow_job" - ], - "summary": "Retry Job Files", - "description": "重试处理指定的文件列表", - "operationId": "retry_job_files_byoa_api_v1_workflow_job__job_id__files_post", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "作业ID", - "title": "Job Id" - }, - "description": "作业ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/FileRetryRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_job/{job_id}/status": { - "get": { - "tags": [ - "workflow_job" - ], - "summary": "Get Job Status", - "description": "获取作业状态\n\nArgs:\n job_id: 作业ID\n user_id: 用户ID\n db: 数据库会话\n\nReturns:\n JobStatusResponse: 作业状态响应\n\nRaises:\n HTTPException: 作业不存在", - "operationId": "get_job_status_byoa_api_v1_workflow_job__job_id__status_get", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "作业ID", - "title": "Job Id" - }, - "description": "作业ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/JobStatusResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/config": { - "get": { - "tags": [ - "workflow_meta" - ], - "summary": "Get Workflow Config", - "description": "获取工作流配置", - "operationId": "get_workflow_config_byoa_api_v1_workflow_meta_config_get", - "parameters": [ - { - "name": "lang", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "zh-CN", - "title": "Lang" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowConfigResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta": { - "post": { - "tags": [ - "workflow_meta" - ], - "summary": "Create Workflow", - "description": "创建工作流", - "operationId": "create_workflow_byoa_api_v1_workflow_meta_post", - "parameters": [ - { - "name": "user-name", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "user_name", - "title": "User-Name" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowMeta_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": [ - "workflow_meta" - ], - "summary": "List Workflows", - "description": "获取作业列表", - "operationId": "list_workflows_byoa_api_v1_workflow_meta_get", - "parameters": [ - { - "name": "name_search", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "名称搜索", - "title": "Name Search" - }, - "description": "名称搜索" - }, - { - "name": "start_time", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "开始时间", - "title": "Start Time" - }, - "description": "开始时间" - }, - { - "name": "end_time", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "description": "结束时间", - "title": "End Time" - }, - "description": "结束时间" - }, - { - "name": "process_modes", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "处理间隔", - "title": "Process Modes" - }, - "description": "处理间隔" - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "状态", - "title": "Status" - }, - "description": "状态" - }, - { - "name": "file_types", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "文件类型", - "title": "File Types" - }, - "description": "文件类型" - }, - { - "name": "priority", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "优先级", - "title": "Priority" - }, - "description": "优先级" - }, - { - "name": "creator", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "创建者", - "title": "Creator" - }, - "description": "创建者" - }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "description": "当页偏移量", - "default": 0, - "title": "Offset" - }, - "description": "当页偏移量" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 1, - "description": "每页大小", - "default": 20, - "title": "Limit" - }, - "description": "每页大小" - }, - { - "name": "sort_field", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "排序字段", - "default": "created_at", - "title": "Sort Field" - }, - "description": "排序字段" - }, - { - "name": "sort_order", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "排序方式", - "default": "descend", - "title": "Sort Order" - }, - "description": "排序方式" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowListResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/{workflow_id}": { - "get": { - "tags": [ - "workflow_meta" - ], - "summary": "Get Workflow Detail", - "description": "获取工作流详情", - "operationId": "get_workflow_detail_byoa_api_v1_workflow_meta__workflow_id__get", - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowDetailResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "workflow_meta" - ], - "summary": "Update Workflow", - "description": ".. deprecated:: moi3.1 \n\n更新工作流\nhistory:\n- moi3.0 ...\n- moi3.1 deprecated", - "operationId": "update_workflow_byoa_api_v1_workflow_meta__workflow_id__put", - "deprecated": true, - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "user-name", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "user_name", - "title": "User-Name" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "workflow_meta" - ], - "summary": "Delete Workflow", - "description": "删除工作流", - "operationId": "delete_workflow_byoa_api_v1_workflow_meta__workflow_id__delete", - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "delete_data", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "是否删除数据", - "default": false, - "title": "Delete Data" - }, - "description": "是否删除数据" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/{workflow_id}/stop": { - "put": { - "tags": [ - "workflow_meta" - ], - "summary": "Stop Workflow", - "description": "停止工作流", - "operationId": "stop_workflow_byoa_api_v1_workflow_meta__workflow_id__stop_put", - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/{workflow_id}/rerun": { - "put": { - "tags": [ - "workflow_meta" - ], - "summary": "Rerun Workflow", - "description": "重新运行工作流", - "operationId": "rerun_workflow_byoa_api_v1_workflow_meta__workflow_id__rerun_put", - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/{workflow_id}/base_info": { - "put": { - "tags": [ - "workflow_meta" - ], - "summary": "Update Workflow Base Info", - "description": "更新工作流基础信息", - "operationId": "update_workflow_base_info_byoa_api_v1_workflow_meta__workflow_id__base_info_put", - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "user-name", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "user_name", - "title": "User-Name" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateWorkflowBaseInfoRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/{workflow_id}/branch": { - "post": { - "tags": [ - "workflow_meta" - ], - "summary": "Create Workflow Branch", - "description": "创建工作流分支", - "operationId": "create_workflow_branch_byoa_api_v1_workflow_meta__workflow_id__branch_post", - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "user-name", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "user_name", - "title": "User-Name" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/WorkflowBranchRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": [ - "workflow_meta" - ], - "summary": "List Workflow Branches", - "description": "获取工作流分支", - "operationId": "list_workflow_branches_byoa_api_v1_workflow_meta__workflow_id__branch_get", - "parameters": [ - { - "name": "workflow_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流ID", - "title": "Workflow Id" - }, - "description": "工作流ID" - }, - { - "name": "status_in", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "工作流状态", - "title": "Status In" - }, - "description": "工作流状态" - }, - { - "name": "branch_status", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "array", - "items": { - "type": "integer" - } - }, - { - "type": "null" - } - ], - "description": "分支状态", - "title": "Branch Status" - }, - "description": "分支状态" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowListResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/branch/{branch_id}": { - "get": { - "tags": [ - "workflow_meta" - ], - "summary": "Get Workflow Branch Detail", - "description": "获取工作流分支 详情", - "operationId": "get_workflow_branch_detail_byoa_api_v1_workflow_meta_branch__branch_id__get", - "parameters": [ - { - "name": "branch_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流-分支ID", - "title": "Branch Id" - }, - "description": "工作流-分支ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowDetailResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "put": { - "tags": [ - "workflow_meta" - ], - "summary": "Update Workflow Branch", - "description": "更新工作流分支", - "operationId": "update_workflow_branch_byoa_api_v1_workflow_meta_branch__branch_id__put", - "parameters": [ - { - "name": "branch_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流-分支ID", - "title": "Branch Id" - }, - "description": "工作流-分支ID" - }, - { - "name": "user-name", - "in": "header", - "required": false, - "schema": { - "type": "string", - "default": "user_name", - "title": "User-Name" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateWorkflowBranchRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "workflow_meta" - ], - "summary": "Delete Workflow Branch", - "description": "删除工作流分支", - "operationId": "delete_workflow_branch_byoa_api_v1_workflow_meta_branch__branch_id__delete", - "parameters": [ - { - "name": "branch_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流-分支ID", - "title": "Branch Id" - }, - "description": "工作流-分支ID" - }, - { - "name": "delete_data", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "是否删除数据", - "default": false, - "title": "Delete Data" - }, - "description": "是否删除数据" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/NoneDataResp" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/branch/{branch_id}/enable": { - "put": { - "tags": [ - "workflow_meta" - ], - "summary": "Enable Workflow Branch", - "description": "启用工作流分支", - "operationId": "enable_workflow_branch_byoa_api_v1_workflow_meta_branch__branch_id__enable_put", - "parameters": [ - { - "name": "branch_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流-分支ID", - "title": "Branch Id" - }, - "description": "工作流-分支ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowDetailResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/branch/{branch_id}/disable": { - "put": { - "tags": [ - "workflow_meta" - ], - "summary": "Disable Workflow Branch", - "description": "禁用工作流分支", - "operationId": "disable_workflow_branch_byoa_api_v1_workflow_meta_branch__branch_id__disable_put", - "parameters": [ - { - "name": "branch_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "工作流-分支ID", - "title": "Branch Id" - }, - "description": "工作流-分支ID" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowDetailResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_meta/name/check": { - "get": { - "tags": [ - "workflow_meta" - ], - "summary": "Check Workflow Name", - "description": "检查工作流名称是否唯一\n\nArgs:\n name: 待检查的工作流名称\n user_id: 用户ID\n db: 数据库会话\n\nReturns:\n 包含 is_unique 字段的响应,表示名称是否唯一", - "operationId": "check_workflow_name_byoa_api_v1_workflow_meta_name_check_get", - "parameters": [ - { - "name": "name", - "in": "query", - "required": true, - "schema": { - "type": "string", - "description": "待检查的工作流名称", - "title": "Name" - }, - "description": "待检查的工作流名称" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_Dict_str__bool__" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/workflow_tpl": { - "get": { - "tags": [ - "workflow_tpl" - ], - "summary": "Get Workflow Templates", - "description": "获取工作流模板列表\n\nArgs:\n skip: 跳过记录数\n limit: 返回记录数限制\n user_id: 用户ID(通过依赖注入获取)\n db: 数据库会话\n\nReturns:\n MOIResponse[WorkflowTplListResponse]: 模板列表响应", - "operationId": "get_workflow_templates_byoa_api_v1_workflow_tpl_get", - "parameters": [ - { - "name": "skip", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "description": "跳过记录数", - "default": 0, - "title": "Skip" - }, - "description": "跳过记录数" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 1000, - "minimum": 1, - "description": "返回记录数限制", - "default": 100, - "title": "Limit" - }, - "description": "返回记录数限制" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_WorkflowTplListResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/component_results": { - "get": { - "tags": [ - "component_results" - ], - "summary": "Get Component Results", - "description": "获取组件结果列表\n\n支持多种过滤条件:\n- workflow_job_id: 工作流作业ID\n- workflow_meta_id: 工作流元数据ID\n- workflow_branch_id: 工作流分支ID\n- file_id: 文件ID\n- component_name: 组件名称", - "operationId": "get_component_results_byoa_api_v1_component_results_get", - "parameters": [ - { - "name": "workflow_job_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "工作流作业ID", - "title": "Workflow Job Id" - }, - "description": "工作流作业ID" - }, - { - "name": "workflow_meta_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "工作流元数据ID", - "title": "Workflow Meta Id" - }, - "description": "工作流元数据ID" - }, - { - "name": "workflow_branch_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "工作流分支ID", - "title": "Workflow Branch Id" - }, - "description": "工作流分支ID" - }, - { - "name": "file_id", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "文件ID", - "title": "File Id" - }, - "description": "文件ID" - }, - { - "name": "component_name", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "description": "组件名称", - "title": "Component Name" - }, - "description": "组件名称" - }, - { - "name": "skip", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "description": "跳过记录数", - "default": 0, - "title": "Skip" - }, - "description": "跳过记录数" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 1000, - "minimum": 1, - "description": "返回记录数", - "default": 100, - "title": "Limit" - }, - "description": "返回记录数" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ComponentResultsResponse" - }, - "title": "Response Get Component Results Byoa Api V1 Component Results Get" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/extract": { - "post": { - "tags": [ - "explore" - ], - "summary": "Extract", - "operationId": "extract_byoa_api_v1_explore_extract_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtractReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ExtractResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes": { - "get": { - "tags": [ - "explore" - ], - "summary": "List Volumes", - "operationId": "list_volumes_byoa_api_v1_explore_volumes_get", - "parameters": [ - { - "name": "workflow_using", - "in": "query", - "required": false, - "schema": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "description": "是否在使用中", - "title": "Workflow Using" - }, - "description": "是否在使用中" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ListVolumeResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "post": { - "tags": [ - "explore" - ], - "summary": "Create Volumes", - "operationId": "create_volumes_byoa_api_v1_explore_volumes_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateVolumeReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_CreateVolumeResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}": { - "get": { - "tags": [ - "explore" - ], - "summary": "List Sub Volumes", - "operationId": "list_sub_volumes_byoa_api_v1_explore_volumes__vid__get", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ListVolumeResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "explore" - ], - "summary": "Delete Volumes", - "operationId": "delete_volumes_byoa_api_v1_explore_volumes__vid__delete", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files": { - "post": { - "tags": [ - "explore" - ], - "summary": "List Volume Files", - "operationId": "list_volume_files_byoa_api_v1_explore_volumes__vid__files_post", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetVolumeFilesReq" - }, - { - "type": "null" - } - ], - "title": "Req" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_GetVolumeFilesResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}": { - "delete": { - "tags": [ - "explore" - ], - "summary": "Delete Volume Files", - "operationId": "delete_volume_files_byoa_api_v1_explore_volumes__vid__files__fid__delete", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "get": { - "tags": [ - "explore" - ], - "summary": "Get File Info", - "operationId": "get_file_info_byoa_api_v1_explore_volumes__vid__files__fid__get", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/raws": { - "get": { - "tags": [ - "explore" - ], - "summary": "Get File Raw", - "operationId": "get_file_raw_byoa_api_v1_explore_volumes__vid__files__fid__raws_get", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "need_embeddings", - "in": "query", - "required": false, - "schema": { - "type": "boolean", - "description": "是否需要embedding", - "default": false, - "title": "Need Embeddings" - }, - "description": "是否需要embedding" - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/parse_result": { - "get": { - "tags": [ - "explore" - ], - "summary": "Get Parse Result", - "operationId": "get_parse_result_byoa_api_v1_explore_volumes__vid__files__fid__parse_result_get", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "file_type", - "in": "query", - "required": true, - "schema": { - "$ref": "#/components/schemas/ParseRstFileType", - "title": "file type" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/jobs": { - "get": { - "tags": [ - "explore" - ], - "summary": "Get File Job", - "operationId": "get_file_job_byoa_api_v1_explore_volumes__vid__files__fid__jobs_get", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_GetFileJobResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/blocks": { - "post": { - "tags": [ - "explore" - ], - "summary": "Get File Blocks", - "description": "获取文件的块数据,支持数据增强结果和普通嵌入块数据两种模式", - "operationId": "get_file_blocks_byoa_api_v1_explore_volumes__vid__files__fid__blocks_post", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFileBlocksReq" - }, - { - "type": "null" - } - ], - "title": "Req" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_GetFileBlocksResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "explore" - ], - "summary": "Delete File Blocks", - "operationId": "delete_file_blocks_byoa_api_v1_explore_volumes__vid__files__fid__blocks_delete", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteFileBlocksReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/ibs_results": { - "post": { - "tags": [ - "explore" - ], - "summary": "Get File Ibs Result", - "operationId": "get_file_ibs_result_byoa_api_v1_explore_volumes__vid__files__fid__ibs_results_post", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFileIbsResultReq" - }, - { - "type": "null" - } - ], - "title": "Req" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_GetFileIbsResultResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "explore" - ], - "summary": "Delete File Ibs Result", - "operationId": "delete_file_ibs_result_byoa_api_v1_explore_volumes__vid__files__fid__ibs_results_delete", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteFileIbsResultReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/ibs_qa_results": { - "post": { - "tags": [ - "explore" - ], - "summary": "Get File Ibs Qa Result", - "operationId": "get_file_ibs_qa_result_byoa_api_v1_explore_volumes__vid__files__fid__ibs_qa_results_post", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFileIbsQaResultReq" - }, - { - "type": "null" - } - ], - "title": "Req" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_GetFileIbsQaResultResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - }, - "delete": { - "tags": [ - "explore" - ], - "summary": "Delete File Ibs Qa Result", - "operationId": "delete_file_ibs_qa_result_byoa_api_v1_explore_volumes__vid__files__fid__ibs_qa_results_delete", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteFileIbsQaResultReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/blocks/{bid}/blobs": { - "get": { - "tags": [ - "explore" - ], - "summary": "Get Block Blob", - "operationId": "get_block_blob_byoa_api_v1_explore_volumes__vid__files__fid__blocks__bid__blobs_get", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "bid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the block id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/blocks/{bid}": { - "put": { - "tags": [ - "explore" - ], - "summary": "Modify Block Content", - "operationId": "modify_block_content_byoa_api_v1_explore_volumes__vid__files__fid__blocks__bid__put", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "bid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the block id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModifyBlockContentReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/MOIResponse_NoneType_" - }, - { - "type": "null" - } - ], - "title": "Response Modify Block Content Byoa Api V1 Explore Volumes Vid Files Fid Blocks Bid Put" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/ibs_results/{irid}": { - "put": { - "tags": [ - "explore" - ], - "summary": "Modify Ibs Result Content", - "operationId": "modify_ibs_result_content_byoa_api_v1_explore_volumes__vid__files__fid__ibs_results__irid__put", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "irid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the ibs result id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModifyIbsResultContentReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/MOIResponse_NoneType_" - }, - { - "type": "null" - } - ], - "title": "Response Modify Ibs Result Content Byoa Api V1 Explore Volumes Vid Files Fid Ibs Results Irid Put" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/{vid}/files/{fid}/ibs_qa_results/{iqrid}": { - "put": { - "tags": [ - "explore" - ], - "summary": "Modify Ibs Qa Result Content", - "operationId": "modify_ibs_qa_result_content_byoa_api_v1_explore_volumes__vid__files__fid__ibs_qa_results__iqrid__put", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "fid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the file id" - } - }, - { - "name": "iqrid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the ibs qa result id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ModifyIbsQaResultContentReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/MOIResponse_NoneType_" - }, - { - "type": "null" - } - ], - "title": "Response Modify Ibs Qa Result Content Byoa Api V1 Explore Volumes Vid Files Fid Ibs Qa Results Iqrid Put" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/explore/volumes/debug/next_file": { - "post": { - "tags": [ - "explore" - ], - "summary": "Get Pending Or Retrying File By Priority", - "operationId": "get_pending_or_retrying_file_by_priority_byoa_api_v1_explore_volumes_debug_next_file_post", - "parameters": [ - { - "name": "file_status", - "in": "query", - "required": false, - "schema": { - "type": "array", - "items": { - "type": "integer" - }, - "description": "文件处理状态", - "title": "File Status" - }, - "description": "文件处理状态" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_GetVolumeFilesResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/export/task/create": { - "post": { - "tags": [ - "export" - ], - "summary": "Createexporttask", - "description": "创建导出任务", - "operationId": "createExportTask_byoa_api_v1_export_task_create_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateExportTaskReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/export/task/list": { - "post": { - "tags": [ - "export" - ], - "summary": "List Export Tasks", - "description": "列出导出任务", - "operationId": "list_export_tasks_byoa_api_v1_export_task_list_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportTasksListReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ExportTasksListResponseData_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/export/task/info": { - "post": { - "tags": [ - "export" - ], - "summary": "List Export Task Info", - "description": "列出导出任务", - "operationId": "list_export_task_info_byoa_api_v1_export_task_info_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportTaskInfoReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ExportTaskInfoResponseData_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/export/task/files": { - "post": { - "tags": [ - "export" - ], - "summary": "List Export Task Files", - "description": "列出某个导出任务的导出文件列表", - "operationId": "list_export_task_files_byoa_api_v1_export_task_files_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportFileListReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ExportFileListResponseData_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/export/task/delete": { - "post": { - "tags": [ - "export" - ], - "summary": "Delete Export Task", - "description": "删除某个导出任务", - "operationId": "delete_export_task_byoa_api_v1_export_task_delete_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExportTaskDeleteReq" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/export/volumes/{vid}/files": { - "post": { - "tags": [ - "export" - ], - "summary": "List Volume Files", - "operationId": "list_volume_files_byoa_api_v1_export_volumes__vid__files_post", - "parameters": [ - { - "name": "vid", - "in": "path", - "required": true, - "schema": { - "type": "string", - "title": "the volume id" - } - }, - { - "name": "user-id", - "in": "header", - "required": true, - "schema": { - "type": "string", - "description": "用户ID", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetVolumeFilesReq" - }, - { - "type": "null" - } - ], - "title": "Req" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_GetVolumeExportFilesResp_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/jst/extract/workflow": { - "post": { - "tags": [ - "jst" - ], - "summary": "Extract Structured Data Workflow", - "description": "结构化抽取(工作流版本)\n使用工作流系统进行抽取,支持完整的任务记录和状态跟踪。\n修改:任务创建后阻塞等待,直到文件状态为COMPLETED或FAILED时才返回最终抽取结果(或超时返回处理中提示)。", - "operationId": "extract_structured_data_workflow_byoa_api_v1_jst_extract_workflow_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "description": "用户ID", - "default": "jst_user", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExtractionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ExtractionResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/jst/extract/workflow/batch": { - "post": { - "tags": [ - "jst" - ], - "summary": "Extract Structured Data Workflow Batch", - "description": "批量结构化抽取(工作流版本)\n使用工作流系统进行批量抽取,支持完整的任务记录和状态跟踪。\n修改:任务创建后阻塞等待,直到所有文件状态为COMPLETED或FAILED时才返回最终抽取结果(或超时返回处理中提示)。", - "operationId": "extract_structured_data_workflow_batch_byoa_api_v1_jst_extract_workflow_batch_post", - "parameters": [ - { - "name": "user-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "description": "用户ID", - "default": "jst_user", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/BatchExtractionRequest" - } - } - } - }, - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ExtractionResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/jst/extract/workflow/{job_id}/results": { - "get": { - "tags": [ - "jst" - ], - "summary": "Get Extraction Workflow Results", - "description": "获取工作流抽取结果\n\n查询指定作业的抽取结果,如果处理完成则返回实际的抽取内容。", - "operationId": "get_extraction_workflow_results_byoa_api_v1_jst_extract_workflow__job_id__results_get", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "作业ID", - "title": "Job Id" - }, - "description": "作业ID" - }, - { - "name": "user-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "description": "用户ID", - "default": "jst_user", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_ExtractionResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/jst/extract/workflow/{job_id}/results/detailed": { - "get": { - "tags": [ - "jst" - ], - "summary": "Get Detailed Extraction Workflow Results", - "description": "获取详细的工作流抽取结果\n\n查询指定作业的抽取结果,返回包含字段详细信息的响应格式。", - "operationId": "get_detailed_extraction_workflow_results_byoa_api_v1_jst_extract_workflow__job_id__results_detailed_get", - "parameters": [ - { - "name": "job_id", - "in": "path", - "required": true, - "schema": { - "type": "string", - "description": "作业ID", - "title": "Job Id" - }, - "description": "作业ID" - }, - { - "name": "user-id", - "in": "header", - "required": false, - "schema": { - "type": "string", - "description": "用户ID", - "default": "jst_user", - "title": "User-Id" - }, - "description": "用户ID" - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/MOIResponse_DetailedExtractionResponse_" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } - }, - "/byoa/api/v1/prometheus_metrics/metrics": { - "get": { - "tags": [ - "prometheus_metrics" - ], - "summary": "Metrics", - "description": "暴露 Prometheus 指标的 HTTP 接口", - "operationId": "metrics_byoa_api_v1_prometheus_metrics_metrics_get", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - } - }, - "components": { - "schemas": { - "AudioConfig": { - "properties": { - "asr_models": { - "items": { - "$ref": "#/components/schemas/StrItem" - }, - "type": "array", - "title": "Asr Models", - "description": "语音转文本模型" - }, - "audio_vad_config": { - "$ref": "#/components/schemas/VadConfig", - "description": "语音VAD配置" - }, - "video_vad_config": { - "$ref": "#/components/schemas/VadConfig", - "description": "视频VAD配置" - } - }, - "type": "object", - "title": "AudioConfig", - "description": "音视频默认配置" - }, - "BatchExtractionRequest": { - "properties": { - "file_urls": { - "items": { - "type": "string" - }, - "type": "array", - "maxItems": 50, - "minItems": 1, - "title": "File Urls", - "description": "要抽取的文件URL列表(支持文本格式:.txt, .md等,PDF文件会自动提取文本内容)" - }, - "extraction_fields": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Extraction Fields", - "description": "要抽取的字段定义,key为字段名,value为字段描述。示例:{'title': '文章标题', 'author': '作者姓名', 'publish_date': '发布日期'}" - }, - "keyword_count": { - "type": "integer", - "maximum": 20.0, - "minimum": 1.0, - "title": "Keyword Count", - "description": "关键词数量(可选,默认5)", - "default": 5 - }, - "json_num_per_block": { - "type": "integer", - "maximum": 10.0, - "minimum": 1.0, - "title": "Json Num Per Block", - "description": "每个块的JSON数量(可选,默认1)", - "default": 1 - }, - "model": { - "type": "string", - "title": "Model", - "description": "使用的AI模型(可选,默认qwen-turbo)", - "default": "qwen-turbo" - } - }, - "type": "object", - "required": [ - "file_urls", - "extraction_fields" - ], - "title": "BatchExtractionRequest", - "description": "批量结构化抽取请求模型" - }, - "BlocksFilter": { - "properties": { - "types": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Types" - }, - "levels": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Levels" - }, - "search_content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Search Content" - }, - "block_ids": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Block Ids" - }, - "list_embedding": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "List Embedding" - } - }, - "type": "object", - "title": "BlocksFilter" - }, - "ColumnConfig": { - "properties": { - "export_column": { - "items": { - "$ref": "#/components/schemas/ExportColumn" - }, - "type": "array", - "title": "Export Column" - }, - "combine_column": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Combine Column" - } - }, - "type": "object", - "required": [ - "export_column", - "combine_column" - ], - "title": "ColumnConfig" - }, - "CompatibilityConfig": { - "properties": { - "upstream": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Upstream", - "description": "上游组件列表", - "default": [] - }, - "downstream": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Downstream", - "description": "下游组件列表", - "default": [] - } - }, - "type": "object", - "title": "CompatibilityConfig", - "description": "兼容性配置" - }, - "ComponentResultsResponse": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "workflow_branch_id": { - "type": "string", - "title": "Workflow Branch Id" - }, - "workflow_meta_id": { - "type": "string", - "title": "Workflow Meta Id" - }, - "component_name": { - "type": "string", - "title": "Component Name" - }, - "component_results": { - "type": "string", - "title": "Component Results" - }, - "workflow_job_id": { - "type": "string", - "title": "Workflow Job Id" - }, - "file_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" - } - }, - "type": "object", - "required": [ - "id", - "workflow_branch_id", - "workflow_meta_id", - "component_name", - "component_results", - "workflow_job_id", - "file_id", - "created_at", - "updated_at" - ], - "title": "ComponentResultsResponse", - "description": "组件结果响应模型" - }, - "CreateExportTaskReq": { - "properties": { - "task_name": { - "type": "string", - "title": "Task Name" - }, - "creator": { - "type": "string", - "title": "Creator" - }, - "connector_id": { - "type": "integer", - "title": "Connector Id" - }, - "connector_name": { - "type": "string", - "title": "Connector Name" - }, - "type": { - "type": "integer", - "title": "Type" - }, - "config": { - "$ref": "#/components/schemas/ExportConfig-Input" - }, - "files": { - "items": { - "$ref": "#/components/schemas/File-Input" - }, - "type": "array", - "title": "Files" - } - }, - "type": "object", - "required": [ - "task_name", - "creator", - "connector_id", - "connector_name", - "type", - "config", - "files" - ], - "title": "CreateExportTaskReq" - }, - "CreateVolumeReq": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "parent_volume_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Parent Volume Id", - "description": "父亲卷ID", - "default": "" - } - }, - "type": "object", - "required": [ - "name" - ], - "title": "CreateVolumeReq" - }, - "CreateVolumeResp": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" - } - }, - "type": "object", - "required": [ - "id", - "name", - "created_at", - "updated_at" - ], - "title": "CreateVolumeResp" - }, - "DeleteFileBlocksReq": { - "properties": { - "ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Ids" - } - }, - "type": "object", - "required": [ - "ids" - ], - "title": "DeleteFileBlocksReq" - }, - "DeleteFileIbsQaResultReq": { - "properties": { - "ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Ids" - } - }, - "type": "object", - "required": [ - "ids" - ], - "title": "DeleteFileIbsQaResultReq" - }, - "DeleteFileIbsResultReq": { - "properties": { - "ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Ids" - } - }, - "type": "object", - "required": [ - "ids" - ], - "title": "DeleteFileIbsResultReq" - }, - "DetailedExtractionResponse": { - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "是否成功" - }, - "results": { - "items": { - "$ref": "#/components/schemas/DetailedExtractionResult" - }, - "type": "array", - "title": "Results", - "description": "详细抽取结果列表" - }, - "total_count": { - "type": "integer", - "title": "Total Count", - "description": "总结果数量" - }, - "message": { - "type": "string", - "title": "Message", - "description": "响应消息", - "default": "" - }, - "processing_time": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Processing Time", - "description": "处理时间(秒)" - }, - "job_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Job Id", - "description": "作业ID" - } - }, - "type": "object", - "required": [ - "success", - "results", - "total_count" - ], - "title": "DetailedExtractionResponse", - "description": "详细的抽取响应模型" - }, - "DetailedExtractionResult": { - "properties": { - "file_url": { - "type": "string", - "title": "File Url", - "description": "文件URL" - }, - "extraction_fields": { - "items": { - "$ref": "#/components/schemas/ExtractionFieldInfo" - }, - "type": "array", - "title": "Extraction Fields", - "description": "抽取字段详细信息列表" - }, - "overall_confidence": { - "anyOf": [ - { - "type": "number", - "maximum": 1.0, - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Overall Confidence", - "description": "整体置信度" - }, - "job_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Job Id", - "description": "作业ID" - }, - "file_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Id", - "description": "文件ID" - }, - "status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Status", - "description": "处理状态" - }, - "error_message": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Error Message", - "description": "错误信息" - } - }, - "type": "object", - "required": [ - "file_url", - "extraction_fields" - ], - "title": "DetailedExtractionResult", - "description": "详细的抽取结果,包含字段信息" - }, - "DifyConfig": { - "properties": { - "dataset_id": { - "type": "string", - "title": "Dataset Id" - }, - "dataset_name": { - "type": "string", - "title": "Dataset Name" - }, - "embedding_model": { - "type": "string", - "title": "Embedding Model" - } - }, - "type": "object", - "required": [ - "dataset_id", - "dataset_name", - "embedding_model" - ], - "title": "DifyConfig" - }, - "EmbeddingItem": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "value": { - "type": "string", - "title": "Value" - }, - "api_base_url": { - "type": "string", - "title": "Api Base Url" - } - }, - "type": "object", - "required": [ - "name", - "value", - "api_base_url" - ], - "title": "EmbeddingItem" - }, - "ExportColumn": { - "properties": { - "source_column": { - "type": "string", - "title": "Source Column" - }, - "mapping_column": { - "type": "string", - "title": "Mapping Column" - } - }, - "type": "object", - "required": [ - "source_column", - "mapping_column" - ], - "title": "ExportColumn" - }, - "ExportConfig-Input": { - "properties": { - "dify_config": { - "anyOf": [ - { - "$ref": "#/components/schemas/DifyConfig" - }, - { - "type": "null" - } - ] - }, - "mo_config": { - "anyOf": [ - { - "$ref": "#/components/schemas/MOConfig-Input" - }, - { - "type": "null" - } - ] - }, - "merge_title_to_text": { - "type": "boolean", - "title": "Merge Title To Text", - "default": false - } - }, - "type": "object", - "title": "ExportConfig" - }, - "ExportConfig-Output": { - "properties": { - "dify_config": { - "anyOf": [ - { - "$ref": "#/components/schemas/DifyConfig" - }, - { - "type": "null" - } - ] - }, - "mo_config": { - "anyOf": [ - { - "$ref": "#/components/schemas/MOConfig-Output" - }, - { - "type": "null" - } - ] - }, - "merge_title_to_text": { - "type": "boolean", - "title": "Merge Title To Text", - "default": false - } - }, - "type": "object", - "title": "ExportConfig" - }, - "ExportFile": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "status": { - "type": "integer", - "title": "Status" - }, - "full_path": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Full Path" - }, - "details": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Details" - }, - "create_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Create Time" - }, - "start_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Start Time" - }, - "end_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "End Time" - } - }, - "type": "object", - "required": [ - "id", - "status", - "full_path", - "details", - "create_time", - "start_time", - "end_time" - ], - "title": "ExportFile" - }, - "ExportFileListReq": { - "properties": { - "offset": { - "type": "integer", - "title": "Offset", - "description": "分页偏移量", - "default": 0 - }, - "limit": { - "type": "integer", - "title": "Limit", - "description": "分页限制", - "default": 10 - }, - "task_id": { - "type": "string", - "title": "Task Id", - "description": "任务ID" - }, - "statuses": { - "anyOf": [ - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Statuses", - "description": "任务状态列表" - }, - "order_by": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Order By", - "description": "排序字段,默认为created_at", - "default": "created_at" - }, - "order_direction": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Order Direction", - "description": "排序方向,默认为desc,可选值为asc或desc", - "default": "desc" - } - }, - "type": "object", - "title": "ExportFileListReq" - }, - "ExportFileListResponseData": { - "properties": { - "files": { - "items": { - "$ref": "#/components/schemas/ExportFile" - }, - "type": "array", - "title": "Files" - }, - "total": { - "type": "integer", - "title": "Total" - } - }, - "type": "object", - "required": [ - "files", - "total" - ], - "title": "ExportFileListResponseData" - }, - "ExportTask": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "connector_name": { - "type": "string", - "title": "Connector Name" - }, - "type": { - "type": "integer", - "title": "Type" - }, - "status": { - "type": "integer", - "title": "Status" - }, - "export_source": { - "items": { - "items": { - "type": "string" - }, - "type": "array" - }, - "type": "array", - "title": "Export Source" - }, - "create_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Create Time" - }, - "end_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "End Time" - } - }, - "type": "object", - "required": [ - "id", - "name", - "connector_name", - "type", - "status", - "export_source", - "create_time", - "end_time" - ], - "title": "ExportTask" - }, - "ExportTaskDeleteReq": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "任务ID" - } - }, - "type": "object", - "title": "ExportTaskDeleteReq" - }, - "ExportTaskInfoReq": { - "properties": { - "id": { - "type": "string", - "title": "Id" - } - }, - "type": "object", - "required": [ - "id" - ], - "title": "ExportTaskInfoReq" - }, - "ExportTaskInfoResponseData": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "creator": { - "type": "string", - "title": "Creator" - }, - "connector_name": { - "type": "string", - "title": "Connector Name" - }, - "type": { - "type": "integer", - "title": "Type" - }, - "status": { - "type": "integer", - "title": "Status" - }, - "config": { - "$ref": "#/components/schemas/ExportConfig-Output" - }, - "create_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Create Time" - }, - "end_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "End Time" - } - }, - "type": "object", - "required": [ - "id", - "name", - "creator", - "connector_name", - "type", - "status", - "config", - "create_time", - "end_time" - ], - "title": "ExportTaskInfoResponseData" - }, - "ExportTasksListReq": { - "properties": { - "offset": { - "type": "integer", - "title": "Offset", - "description": "分页偏移量", - "default": 0 - }, - "limit": { - "type": "integer", - "title": "Limit", - "description": "分页限制", - "default": 10 - }, - "statuses": { - "anyOf": [ - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Statuses", - "description": "任务状态列表" - }, - "creator": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Creator", - "description": "任务创建用户" - }, - "connector_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Connector Name", - "description": "连接器名称" - }, - "task_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Task Id", - "description": "任务ID" - }, - "order_by": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Order By", - "description": "排序字段,默认为created_at", - "default": "created_at" - }, - "order_direction": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Order Direction", - "description": "排序方向,默认为desc,可选值为asc或desc", - "default": "desc" - } - }, - "type": "object", - "title": "ExportTasksListReq" - }, - "ExportTasksListResponseData": { - "properties": { - "tasks": { - "items": { - "$ref": "#/components/schemas/ExportTask" - }, - "type": "array", - "title": "Tasks" - }, - "total": { - "type": "integer", - "title": "Total" - } - }, - "type": "object", - "required": [ - "tasks", - "total" - ], - "title": "ExportTasksListResponseData" - }, - "ExtractReq": { - "properties": { - "json_schema": { - "additionalProperties": true, - "type": "object", - "title": "Json Schema", - "description": "output json schema" - }, - "file_path": { - "type": "string", - "title": "File Path", - "description": "file path" - } - }, - "type": "object", - "required": [ - "json_schema", - "file_path" - ], - "title": "ExtractReq" - }, - "ExtractResp": { - "properties": { - "req_id": { - "type": "string", - "title": "Req Id", - "description": "request id" - }, - "msg": { - "type": "string", - "title": "Msg", - "description": "message" - }, - "file_path": { - "type": "string", - "title": "File Path", - "description": "file path" - }, - "file_size_bytes": { - "type": "integer", - "title": "File Size Bytes", - "description": "file size in bytes" - }, - "results": { - "additionalProperties": true, - "type": "object", - "title": "Results", - "description": "results in json format" - } - }, - "type": "object", - "required": [ - "req_id", - "msg", - "file_path", - "file_size_bytes", - "results" - ], - "title": "ExtractResp" - }, - "ExtractionFieldInfo": { - "properties": { - "field_name": { - "type": "string", - "title": "Field Name", - "description": "字段名称" - }, - "field_description": { - "type": "string", - "title": "Field Description", - "description": "字段描述" - }, - "extracted_value": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Extracted Value", - "description": "抽取到的值,如果未抽取到则为null" - }, - "confidence": { - "anyOf": [ - { - "type": "number", - "maximum": 1.0, - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Confidence", - "description": "该字段的置信度" - } - }, - "type": "object", - "required": [ - "field_name", - "field_description" - ], - "title": "ExtractionFieldInfo", - "description": "抽取字段信息" - }, - "ExtractionRequest": { - "properties": { - "file_url": { - "type": "string", - "title": "File Url", - "description": "要抽取的文件URL(支持文本格式:.txt, .md等,PDF文件会自动提取文本内容)" - }, - "extraction_fields": { - "additionalProperties": { - "type": "string" - }, - "type": "object", - "title": "Extraction Fields", - "description": "要抽取的字段定义,key为字段名,value为字段描述。示例:{'title': '文章标题', 'author': '作者姓名', 'publish_date': '发布日期'}" - }, - "keyword_count": { - "type": "integer", - "maximum": 20.0, - "minimum": 1.0, - "title": "Keyword Count", - "description": "关键词数量(可选,默认5)", - "default": 5 - }, - "json_num_per_block": { - "type": "integer", - "maximum": 10.0, - "minimum": 1.0, - "title": "Json Num Per Block", - "description": "每个块的JSON数量(可选,默认1)", - "default": 1 - }, - "model": { - "type": "string", - "title": "Model", - "description": "使用的AI模型(可选,默认qwen-turbo)", - "default": "qwen-turbo" - } - }, - "type": "object", - "required": [ - "file_url", - "extraction_fields" - ], - "title": "ExtractionRequest", - "description": "结构化抽取请求模型" - }, - "ExtractionResponse": { - "properties": { - "success": { - "type": "boolean", - "title": "Success", - "description": "是否成功" - }, - "results": { - "items": { - "$ref": "#/components/schemas/ExtractionResult" - }, - "type": "array", - "title": "Results", - "description": "抽取结果列表" - }, - "total_count": { - "type": "integer", - "title": "Total Count", - "description": "总结果数量" - }, - "message": { - "type": "string", - "title": "Message", - "description": "响应消息", - "default": "" - }, - "processing_time": { - "anyOf": [ - { - "type": "number" - }, - { - "type": "null" - } - ], - "title": "Processing Time", - "description": "处理时间(秒)" - }, - "job_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Job Id", - "description": "作业ID" - } - }, - "type": "object", - "required": [ - "success", - "results", - "total_count" - ], - "title": "ExtractionResponse", - "description": "结构化抽取响应模型" - }, - "ExtractionResult": { - "properties": { - "file_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Url", - "description": "文件URL" - }, - "extracted_fields": { - "additionalProperties": true, - "type": "object", - "title": "Extracted Fields", - "description": "抽取的字段内容,包含所有请求的字段,未抽取到的字段值为null" - }, - "confidence": { - "anyOf": [ - { - "type": "number", - "maximum": 1.0, - "minimum": 0.0 - }, - { - "type": "null" - } - ], - "title": "Confidence", - "description": "置信度" - }, - "job_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Job Id", - "description": "作业ID" - }, - "file_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Id", - "description": "文件ID" - }, - "status": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Status", - "description": "处理状态" - }, - "error_message": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Error Message", - "description": "错误信息" - } - }, - "type": "object", - "required": [ - "extracted_fields" - ], - "title": "ExtractionResult", - "description": "单个抽取结果" - }, - "File-Input": { - "properties": { - "file_id": { - "type": "string", - "title": "File Id" - }, - "full_path": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Full Path" - } - }, - "type": "object", - "required": [ - "file_id", - "full_path" - ], - "title": "File" - }, - "File-Output": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" - }, - "user_id": { - "type": "string", - "title": "User Id", - "description": "DC user id", - "default": "dc_user_id" - }, - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "source_volume_id": { - "type": "string", - "title": "Source Volume Id", - "description": "源数据卷ID" - }, - "source_file_id": { - "type": "string", - "title": "Source File Id", - "description": "源文件ID" - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标数据卷ID" - }, - "file_name": { - "type": "string", - "title": "File Name", - "description": "文件名" - }, - "file_type": { - "type": "integer", - "title": "File Type", - "description": "文件类型" - }, - "file_size": { - "type": "integer", - "title": "File Size", - "description": "文件大小" - }, - "file_path": { - "type": "string", - "title": "File Path", - "description": "文件路径" - }, - "file_status": { - "type": "integer", - "title": "File Status", - "description": "文件状态" - }, - "last_component": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Last Component", - "description": "最后处理的节点" - }, - "workflow_meta_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Workflow Meta Id", - "description": "工作流元数据ID" - }, - "workflow_meta_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Workflow Meta Name", - "description": "工作流元数据名称" - }, - "workflow_branch_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Workflow Branch Id", - "description": "工作流分支ID" - }, - "workflow_branch_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Workflow Branch Name", - "description": "工作流分支名称" - }, - "layout_enable": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Layout Enable", - "description": "该文件是否有 layout 结构" - }, - "job_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Job Id", - "description": "作业ID" - }, - "component_results": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Component Results" - }, - "error_message": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Error Message", - "description": "错误信息" - }, - "duration": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Duration", - "description": "处理时长", - "default": 0 - }, - "start_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Start Time", - "description": "开始处理时间" - }, - "end_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "End Time", - "description": "结束处理时间" - }, - "delete_status": { - "type": "integer", - "title": "Delete Status", - "description": "删除状态: 0-未删除, 1-待删除", - "default": 0 - } - }, - "type": "object", - "required": [ - "source_volume_id", - "source_file_id", - "target_volume_id", - "file_name", - "file_type", - "file_size", - "file_path", - "file_status" - ], - "title": "File", - "description": "文件数据库模型" - }, - "FileInfo": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "文件ID" - }, - "file_name": { - "type": "string", - "title": "File Name", - "description": "文件名" - }, - "file_type": { - "type": "integer", - "title": "File Type", - "description": "文件类型" - }, - "file_status": { - "type": "integer", - "title": "File Status", - "description": "文件状态" - }, - "error_message": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Error Message", - "description": "错误信息" - }, - "start_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Start Time", - "description": "开始处理时间" - }, - "end_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "End Time", - "description": "结束处理时间" - } - }, - "type": "object", - "required": [ - "id", - "file_name", - "file_type", - "file_status", - "start_time", - "end_time" - ], - "title": "FileInfo", - "description": "文件信息响应模型" - }, - "FileInfoForExport": { - "properties": { - "user_id": { - "type": "string", - "title": "User Id", - "description": "DC user id", - "default": "dc_user_id" - }, - "id": { - "type": "string", - "title": "Id", - "description": "文件ID" - }, - "file_name": { - "type": "string", - "title": "File Name", - "description": "文件名" - }, - "file_status": { - "type": "integer", - "title": "File Status", - "description": "文件状态" - }, - "file_type": { - "type": "integer", - "title": "File Type", - "description": "文件类型" - } - }, - "type": "object", - "required": [ - "id", - "file_name", - "file_status", - "file_type" - ], - "title": "FileInfoForExport" - }, - "FileItem": { - "properties": { - "file_name": { - "type": "string", - "title": "File Name", - "description": "文件名" - }, - "file_type": { - "$ref": "#/components/schemas/FileType", - "description": "文件类型" - }, - "file_size": { - "type": "integer", - "title": "File Size", - "description": "文件大小" - }, - "file_path": { - "type": "string", - "title": "File Path", - "description": "文件路径" - }, - "source_volume_id": { - "type": "integer", - "title": "Source Volume Id", - "description": "源数据卷ID" - }, - "source_file_id": { - "type": "integer", - "title": "Source File Id", - "description": "源文件ID" - } - }, - "type": "object", - "required": [ - "file_name", - "file_type", - "file_size", - "file_path", - "source_volume_id", - "source_file_id" - ], - "title": "FileItem", - "description": "文件项模型" - }, - "FileRetryRequest": { - "properties": { - "files": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Files", - "description": "要重试的文件ID列表" - } - }, - "type": "object", - "required": [ - "files" - ], - "title": "FileRetryRequest", - "description": "文件重试请求模型", - "example": { - "files": [ - "file_id1", - "file_id2" - ] - } - }, - "FileType": { - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21, - 22, - 23, - 24, - 25, - 27, - 28, - 29, - 30, - 31, - 32, - 33, - 34 - ], - "title": "FileType", - "description": "文件类型枚举\nrefer: https://github.com/matrixorigin/mocloud-protocol/blob/dfb8c934b26b8d48d2252c6c42530f6ec3301fb1/protobuf/rpc/connector/enum.pb.go#L425" - }, - "FileTypeItem": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "value": { - "type": "integer", - "title": "Value" - }, - "mimetypes": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Mimetypes" - } - }, - "type": "object", - "required": [ - "name", - "value", - "mimetypes" - ], - "title": "FileTypeItem", - "description": "文件类型项" - }, - "Filter": { - "properties": { - "types": { - "anyOf": [ - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Types" - }, - "status": { - "anyOf": [ - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Status" - }, - "exclude_status": { - "anyOf": [ - { - "items": { - "type": "integer" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Exclude Status" - } - }, - "type": "object", - "title": "Filter" - }, - "GetFileBlocksReq": { - "properties": { - "filters": { - "anyOf": [ - { - "$ref": "#/components/schemas/BlocksFilter" - }, - { - "type": "null" - } - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "default": 0 - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "default": 30 - } - }, - "type": "object", - "title": "GetFileBlocksReq" - }, - "GetFileBlocksResp": { - "properties": { - "total": { - "type": "integer", - "title": "Total" - }, - "type": { - "type": "integer", - "title": "Type", - "default": 0 - }, - "items": { - "anyOf": [ - { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - }, - { - "items": { - "$ref": "#/components/schemas/SampleEmbeddingResult" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Items" - } - }, - "type": "object", - "required": [ - "total", - "items" - ], - "title": "GetFileBlocksResp" - }, - "GetFileIbsQaResultReq": { - "properties": { - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "default": 0 - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "default": 30 - } - }, - "type": "object", - "title": "GetFileIbsQaResultReq" - }, - "GetFileIbsQaResultResp": { - "properties": { - "total": { - "type": "integer", - "title": "Total" - }, - "items": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SampleIbsQaResult" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Items" - } - }, - "type": "object", - "required": [ - "total", - "items" - ], - "title": "GetFileIbsQaResultResp" - }, - "GetFileIbsResultReq": { - "properties": { - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "default": 0 - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "default": 30 - } - }, - "type": "object", - "title": "GetFileIbsResultReq" - }, - "GetFileIbsResultResp": { - "properties": { - "total": { - "type": "integer", - "title": "Total" - }, - "items": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SampleIbsResult" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Items" - } - }, - "type": "object", - "required": [ - "total", - "items" - ], - "title": "GetFileIbsResultResp" - }, - "GetFileJobResp": { - "properties": { - "job": { - "additionalProperties": true, - "type": "object", - "title": "Job" - } - }, - "type": "object", - "required": [ - "job" - ], - "title": "GetFileJobResp" - }, - "GetVolumeExportFilesResp": { - "properties": { - "total": { - "type": "integer", - "title": "Total" - }, - "items": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/FileInfoForExport" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Items" - } - }, - "type": "object", - "required": [ - "total", - "items" - ], - "title": "GetVolumeExportFilesResp", - "description": "导出文件列表响应模型" - }, - "GetVolumeFilesReq": { - "properties": { - "filters": { - "anyOf": [ - { - "$ref": "#/components/schemas/Filter" - }, - { - "type": "null" - } - ] - }, - "sorter": { - "anyOf": [ - { - "$ref": "#/components/schemas/Sorter" - }, - { - "type": "null" - } - ] - }, - "offset": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Offset", - "default": 0 - }, - "limit": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Limit", - "default": 30 - } - }, - "type": "object", - "title": "GetVolumeFilesReq" - }, - "GetVolumeFilesResp": { - "properties": { - "total": { - "type": "integer", - "title": "Total" - }, - "items": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/File-Output" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Items" - } - }, - "type": "object", - "required": [ - "total", - "items" - ], - "title": "GetVolumeFilesResp" - }, - "HTTPValidationError": { - "properties": { - "detail": { - "items": { - "$ref": "#/components/schemas/ValidationError" - }, - "type": "array", - "title": "Detail" - } - }, - "type": "object", - "title": "HTTPValidationError" - }, - "IndexWorkflowJobCreateResponse": { - "properties": { - "job": { - "$ref": "#/components/schemas/WorkflowJobs" - } - }, - "type": "object", - "required": [ - "job" - ], - "title": "IndexWorkflowJobCreateResponse", - "description": "作业创建响应模型" - }, - "IndexWorkflowJobFileListData": { - "properties": { - "files": { - "items": { - "$ref": "#/components/schemas/FileInfo" - }, - "type": "array", - "title": "Files", - "description": "文件列表" - }, - "file_total": { - "type": "integer", - "title": "File Total", - "description": "总文件数(过滤后的)" - }, - "total": { - "type": "integer", - "title": "Total", - "description": "总数" - }, - "completed": { - "type": "integer", - "title": "Completed", - "description": "已完成" - }, - "failed": { - "type": "integer", - "title": "Failed", - "description": "失败" - }, - "processing": { - "type": "integer", - "title": "Processing", - "description": "处理中" - }, - "pending": { - "type": "integer", - "title": "Pending", - "description": "待处理" - }, - "stopped": { - "type": "integer", - "title": "Stopped", - "description": "已停止" - } - }, - "type": "object", - "required": [ - "files", - "file_total", - "total", - "completed", - "failed", - "processing", - "pending", - "stopped" - ], - "title": "IndexWorkflowJobFileListData", - "description": "作业详情响应模型", - "example": { - "completed": "已完成", - "failed": "失败", - "files": [ - { - "end_time": "结束处理时间", - "error_message": "错误信息", - "file_name": "文件名", - "file_status": "文件状态", - "file_type": "文件类型", - "id": "文件 ID", - "start_time": "开始处理时间" - } - ], - "pending": "待处理", - "processing": "处理中", - "total": "总数" - } - }, - "IndexWorkflowJobListItem": { - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id", - "description": "作业ID" - }, - "workflow_name": { - "type": "string", - "title": "Workflow Name", - "description": "工作流名称" - }, - "source_volume_names": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Names", - "description": "源数据卷名称" - }, - "source_volume_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Ids", - "description": "源数据卷ID" - }, - "target_volume_name": { - "type": "string", - "title": "Target Volume Name", - "description": "目标数据卷名称" - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标数据卷ID" - }, - "file_types": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "File Types", - "description": "文件类型" - }, - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "start_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Start Time", - "description": "开始处理时间" - }, - "end_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "End Time", - "description": "结束处理时间" - }, - "duration": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Duration", - "description": "处理时长" - }, - "processed_count": { - "type": "integer", - "title": "Processed Count", - "description": "当前 Job 已经处理数量" - }, - "total_count": { - "type": "integer", - "title": "Total Count", - "description": "当前 Job 数据总量" - }, - "status": { - "type": "integer", - "title": "Status", - "description": "状态" - }, - "workflow": { - "$ref": "#/components/schemas/WorkflowConfig" - }, - "workflow_id": { - "type": "string", - "title": "Workflow Id", - "description": "工作流ID" - }, - "workflow_meta_id": { - "type": "string", - "title": "Workflow Meta Id", - "description": "工作流作业元数据ID" - }, - "workflow_branch_id": { - "type": "string", - "title": "Workflow Branch Id", - "description": "工作流作业元数据ID" - }, - "branch_name": { - "type": "string", - "title": "Branch Name", - "description": "分支名" - }, - "version": { - "type": "string", - "title": "Version", - "description": "版本号" - } - }, - "type": "object", - "required": [ - "id", - "workflow_name", - "source_volume_names", - "source_volume_ids", - "target_volume_name", - "target_volume_id", - "file_types", - "start_time", - "end_time", - "duration", - "processed_count", - "total_count", - "status", - "workflow", - "workflow_id", - "workflow_meta_id", - "workflow_branch_id", - "branch_name", - "version" - ], - "title": "IndexWorkflowJobListItem", - "description": "作业列表项模型", - "example": { - "duration": "处理时长", - "end_time": "结束处理时间", - "file_types": [ - "文件类型1", - "文件类型2" - ], - "id": "Job ID", - "processed_count": "已处理数量", - "source_volume_ids": [ - "源数据卷ID1", - "源数据卷ID2" - ], - "source_volume_names": [ - "源数据卷名称1", - "源数据卷名称2" - ], - "start_time": "开始处理时间", - "status": "状态", - "target_volume_id": "目标数据卷ID", - "target_volume_name": "目标数据卷名称", - "total_count": "总数", - "workflow": "工作流配置 yaml", - "workflow_id": "工作流ID", - "workflow_name": "工作流名称" - } - }, - "IndexWorkflowJobListResponseData": { - "properties": { - "total": { - "type": "integer", - "title": "Total", - "description": "总数" - }, - "jobs": { - "items": { - "$ref": "#/components/schemas/IndexWorkflowJobListItem" - }, - "type": "array", - "title": "Jobs", - "description": "作业列表" - } - }, - "type": "object", - "required": [ - "total", - "jobs" - ], - "title": "IndexWorkflowJobListResponseData", - "description": "作业列表响应模型", - "example": { - "jobs": [ - { - "duration": "处理时长", - "end_time": "结束处理时间", - "file_types": [ - "文件类型1", - "文件类型2" - ], - "id": "Job ID", - "processed_count": "已处理数量", - "source_volume_ids": [ - "源数据卷ID1", - "源数据卷ID2" - ], - "source_volume_names": [ - "源数据卷名称1", - "源数据卷名称2" - ], - "start_time": "开始处理时间", - "status": "状态", - "target_volume_id": "目标数据卷ID", - "target_volume_name": "目标数据卷名称", - "total_count": "总数", - "workflow": "工作流配置 yaml", - "workflow_id": "工作流ID", - "workflow_name": "工作流名称" - } - ], - "total": 100 - } - }, - "IntItem": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "value": { - "type": "integer", - "title": "Value" - } - }, - "type": "object", - "required": [ - "name", - "value" - ], - "title": "IntItem" - }, - "JobCreateRequest": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "作业名称" - }, - "workflow_meta_id": { - "type": "string", - "title": "Workflow Meta Id", - "description": "工作流作业元数据ID" - }, - "workflow_branch_id": { - "type": "string", - "title": "Workflow Branch Id", - "description": "工作流分支ID" - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标数据卷ID" - }, - "files": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/FileItem" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Files", - "description": "文件列表", - "default": [] - } - }, - "type": "object", - "required": [ - "name", - "workflow_meta_id", - "workflow_branch_id", - "target_volume_id" - ], - "title": "JobCreateRequest", - "description": "作业创建请求模型", - "example": { - "files": [ - { - "file_name": "test.txt", - "file_path": "/data/test.txt", - "file_type": 1, - "source_file_id": 456, - "source_volume_id": 123 - } - ], - "name": "test_job", - "target_volume_id": "123", - "workflow_id": "workflow_123", - "workflow_meta_id": "workflow_123" - } - }, - "JobStatusResponse": { - "properties": { - "status": { - "$ref": "#/components/schemas/WorkflowJobStatus", - "description": "作业状态" - } - }, - "type": "object", - "required": [ - "status" - ], - "title": "JobStatusResponse", - "description": "作业状态响应模型" - }, - "JsonSchemaType": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "类型名称" - }, - "value": { - "$ref": "#/components/schemas/JsonSchemaTypeEnum", - "description": "类型值" - } - }, - "type": "object", - "required": [ - "name", - "value" - ], - "title": "JsonSchemaType" - }, - "JsonSchemaTypeEnum": { - "type": "string", - "enum": [ - "alpaca", - "sharegpt", - "openai", - "cec_single", - "cec_multi", - "customize" - ], - "title": "JsonSchemaTypeEnum" - }, - "ListVolumeResp": { - "properties": { - "total": { - "type": "integer", - "title": "Total", - "default": 0 - }, - "volumes": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/TargetVolume" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Volumes" - } - }, - "type": "object", - "title": "ListVolumeResp" - }, - "MOConfig-Input": { - "properties": { - "database_name": { - "type": "string", - "title": "Database Name" - }, - "table_name": { - "type": "string", - "title": "Table Name" - }, - "new_table": { - "type": "boolean", - "title": "New Table", - "default": false - }, - "column": { - "$ref": "#/components/schemas/ColumnConfig" - }, - "duplicated_strategy": { - "type": "integer", - "title": "Duplicated Strategy" - } - }, - "type": "object", - "required": [ - "database_name", - "table_name", - "column", - "duplicated_strategy" - ], - "title": "MOConfig" - }, - "MOConfig-Output": { - "properties": { - "database_name": { - "type": "string", - "title": "Database Name" - }, - "table_name": { - "type": "string", - "title": "Table Name" - }, - "new_table": { - "type": "boolean", - "title": "New Table", - "default": false - }, - "column": { - "$ref": "#/components/schemas/ColumnConfig" - }, - "duplicated_strategy": { - "type": "integer", - "title": "Duplicated Strategy" - } - }, - "type": "object", - "required": [ - "database_name", - "table_name", - "column", - "duplicated_strategy" - ], - "title": "MOConfig" - }, - "MOIResponse": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - {}, - { - "type": "null" - } - ], - "title": "Data" - } - }, - "type": "object", - "title": "MOIResponse" - }, - "MOIResponse_CreateVolumeResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/CreateVolumeResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[CreateVolumeResp]" - }, - "MOIResponse_DetailedExtractionResponse_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/DetailedExtractionResponse" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[DetailedExtractionResponse]" - }, - "MOIResponse_Dict_str__bool__": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "additionalProperties": { - "type": "boolean" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Data" - } - }, - "type": "object", - "title": "MOIResponse[Dict[str, bool]]" - }, - "MOIResponse_ExportFileListResponseData_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExportFileListResponseData" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[ExportFileListResponseData]" - }, - "MOIResponse_ExportTaskInfoResponseData_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExportTaskInfoResponseData" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[ExportTaskInfoResponseData]" - }, - "MOIResponse_ExportTasksListResponseData_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExportTasksListResponseData" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[ExportTasksListResponseData]" - }, - "MOIResponse_ExtractResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExtractResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[ExtractResp]" - }, - "MOIResponse_ExtractionResponse_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/ExtractionResponse" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[ExtractionResponse]" - }, - "MOIResponse_GetFileBlocksResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFileBlocksResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[GetFileBlocksResp]" - }, - "MOIResponse_GetFileIbsQaResultResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFileIbsQaResultResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[GetFileIbsQaResultResp]" - }, - "MOIResponse_GetFileIbsResultResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFileIbsResultResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[GetFileIbsResultResp]" - }, - "MOIResponse_GetFileJobResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetFileJobResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[GetFileJobResp]" - }, - "MOIResponse_GetVolumeExportFilesResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetVolumeExportFilesResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[GetVolumeExportFilesResp]" - }, - "MOIResponse_GetVolumeFilesResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/GetVolumeFilesResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[GetVolumeFilesResp]" - }, - "MOIResponse_IndexWorkflowJobFileListData_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexWorkflowJobFileListData" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[IndexWorkflowJobFileListData]" - }, - "MOIResponse_IndexWorkflowJobListItem_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexWorkflowJobListItem" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[IndexWorkflowJobListItem]" - }, - "MOIResponse_IndexWorkflowJobListResponseData_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/IndexWorkflowJobListResponseData" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[IndexWorkflowJobListResponseData]" - }, - "MOIResponse_ListVolumeResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/ListVolumeResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[ListVolumeResp]" - }, - "MOIResponse_NoneType_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "type": "null", - "title": "Data" - } - }, - "type": "object", - "title": "MOIResponse[NoneType]" - }, - "MOIResponse_WorkflowConfigResponse_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowConfigResponse" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[WorkflowConfigResponse]" - }, - "MOIResponse_WorkflowDetailResponse_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowDetailResponse" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[WorkflowDetailResponse]" - }, - "MOIResponse_WorkflowListResponse_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowListResponse" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[WorkflowListResponse]" - }, - "MOIResponse_WorkflowMeta_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowMeta" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[WorkflowMeta]" - }, - "MOIResponse_WorkflowTplListResp_": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowTplListResp" - }, - { - "type": "null" - } - ] - } - }, - "type": "object", - "title": "MOIResponse[WorkflowTplListResp]" - }, - "ModifyBlockContentReq": { - "properties": { - "content": { - "type": "string", - "title": "Content" - } - }, - "type": "object", - "required": [ - "content" - ], - "title": "ModifyBlockContentReq" - }, - "ModifyIbsQaResultContentReq": { - "properties": { - "content": { - "type": "string", - "title": "Content" - } - }, - "type": "object", - "required": [ - "content" - ], - "title": "ModifyIbsQaResultContentReq" - }, - "ModifyIbsResultContentReq": { - "properties": { - "content": { - "type": "string", - "title": "Content" - } - }, - "type": "object", - "required": [ - "content" - ], - "title": "ModifyIbsResultContentReq" - }, - "NoneDataResp": { - "properties": { - "code": { - "type": "string", - "title": "Code", - "default": "ok" - }, - "msg": { - "type": "string", - "title": "Msg", - "default": "ok" - }, - "data": { - "type": "null", - "title": "Data" - } - }, - "type": "object", - "title": "NoneDataResp" - }, - "ParseRstFileType": { - "type": "string", - "enum": [ - "markdown", - "layout" - ], - "title": "ParseRstFileType", - "description": "parse result file type" - }, - "ProcessModeConfig": { - "properties": { - "interval": { - "type": "integer", - "title": "Interval", - "description": "处理间隔(分钟)", - "default": 0 - }, - "offset": { - "type": "integer", - "title": "Offset", - "description": "处理时间偏移量(分钟)", - "default": 0 - } - }, - "type": "object", - "title": "ProcessModeConfig", - "description": "工作流处理模式配置" - }, - "RangeConfig": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "配置项名称" - }, - "min_value": { - "type": "number", - "title": "Min Value", - "description": "最小值" - }, - "max_value": { - "type": "number", - "title": "Max Value", - "description": "最大值" - }, - "default_value": { - "type": "number", - "title": "Default Value", - "description": "默认值" - }, - "step": { - "type": "number", - "title": "Step", - "description": "步长", - "default": 0.1 - }, - "unit": { - "type": "string", - "title": "Unit", - "description": "单位", - "default": "秒" - } - }, - "type": "object", - "required": [ - "name", - "min_value", - "max_value", - "default_value" - ], - "title": "RangeConfig", - "description": "范围配置" - }, - "SampleEmbeddingResult": { - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id" - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Content" - }, - "type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Type" - }, - "content_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Content Type" - }, - "file_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Id" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "created_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Created At" - }, - "updated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Updated At" - }, - "text_and_image_id": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Text And Image Id" - }, - "image_process_type": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Image Process Type" - }, - "level": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Level" - } - }, - "type": "object", - "title": "SampleEmbeddingResult" - }, - "SampleIbsQaResult": { - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id" - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Content" - }, - "file_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Id" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "created_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Created At" - }, - "updated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Updated At" - } - }, - "type": "object", - "title": "SampleIbsQaResult" - }, - "SampleIbsResult": { - "properties": { - "id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Id" - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Content" - }, - "file_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Id" - }, - "description": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Description" - }, - "created_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Created At" - }, - "updated_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "Updated At" - } - }, - "type": "object", - "title": "SampleIbsResult" - }, - "Sorter": { - "properties": { - "sort_by": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Sort By" - }, - "is_desc": { - "anyOf": [ - { - "type": "boolean" - }, - { - "type": "null" - } - ], - "title": "Is Desc", - "default": true - } - }, - "type": "object", - "title": "Sorter" - }, - "SourceFileInfo": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "源文件ID" - }, - "file_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "File Name", - "description": "文件名" - } - }, - "type": "object", - "required": [ - "id", - "file_name" - ], - "title": "SourceFileInfo" - }, - "StrItem": { - "properties": { - "name": { - "type": "string", - "title": "Name" - }, - "value": { - "type": "string", - "title": "Value" - } - }, - "type": "object", - "required": [ - "name", - "value" - ], - "title": "StrItem" - }, - "TargetVolume": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "The target volume name" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" - }, - "user_id": { - "type": "string", - "title": "User Id", - "description": "DC user id", - "default": "dc_user_id" - }, - "id": { - "type": "string", - "title": "Id" - }, - "parent_volume_id": { - "type": "string", - "title": "Parent Volume Id", - "description": "Parent volume ID" - } - }, - "type": "object", - "required": [ - "name", - "parent_volume_id" - ], - "title": "TargetVolume" - }, - "UpdateWorkflowBaseInfoRequest": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "工作流名称" - }, - "source_volume_names": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Names", - "description": "源数据卷列表名字" - }, - "source_volume_ids": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "Source Volume Ids", - "description": "源数据卷列表id" - }, - "process_mode": { - "$ref": "#/components/schemas/ProcessModeConfig", - "description": "处理模式配置" - }, - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标数据卷id" - }, - "create_target_volume_name": { - "type": "string", - "title": "Create Target Volume Name", - "description": "创建目标数据卷名称" - }, - "file_types": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "File Types", - "description": "文件类型列表" - }, - "files": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SourceFileInfo" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Files", - "description": "指定文件的列表" - } - }, - "type": "object", - "required": [ - "name", - "source_volume_names", - "source_volume_ids", - "process_mode", - "target_volume_id", - "create_target_volume_name", - "file_types" - ], - "title": "UpdateWorkflowBaseInfoRequest", - "description": "更新 工作流-基础信息 请求模型" - }, - "UpdateWorkflowBranchRequest": { - "properties": { - "branch_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Name", - "description": "分支名", - "default": "" - }, - "workflow": { - "$ref": "#/components/schemas/WorkflowConfig" - } - }, - "type": "object", - "required": [ - "workflow" - ], - "title": "UpdateWorkflowBranchRequest", - "description": "更新工作流分支信息 请求模型" - }, - "VadConfig": { - "properties": { - "is_video": { - "type": "boolean", - "title": "Is Video", - "description": "是否为视频", - "default": false - }, - "min_silence_duration": { - "$ref": "#/components/schemas/RangeConfig", - "description": "最小静音间隔配置" - }, - "max_speech_duration": { - "$ref": "#/components/schemas/RangeConfig", - "description": "最大语音时长配置" - } - }, - "type": "object", - "title": "VadConfig", - "description": "VAD配置" - }, - "ValidationError": { - "properties": { - "loc": { - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer" - } - ] - }, - "type": "array", - "title": "Location" - }, - "msg": { - "type": "string", - "title": "Message" - }, - "type": { - "type": "string", - "title": "Error Type" - } - }, - "type": "object", - "required": [ - "loc", - "msg", - "type" - ], - "title": "ValidationError" - }, - "WorkflowBranchItem": { - "properties": { - "branch_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Id", - "description": "分支ID" - }, - "created_at": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Created At", - "description": "创建时间" - }, - "creator": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Creator", - "description": "创建者" - }, - "updated_at": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Updated At", - "description": "更新时间" - }, - "modifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Modifier", - "description": "更新者" - }, - "status": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Status", - "description": "状态" - }, - "workflow": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowConfig" - }, - { - "type": "null" - } - ], - "description": "工作流配置" - }, - "branch_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Name", - "description": "分支名" - }, - "branch_status": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Branch Status", - "description": "分支状态" - }, - "branch_volume_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Volume Id", - "description": "分支目标数据卷ID" - } - }, - "type": "object", - "required": [ - "branch_id", - "created_at", - "creator", - "updated_at", - "modifier", - "status", - "workflow", - "branch_name", - "branch_status" - ], - "title": "WorkflowBranchItem", - "description": "工作流分支 响应模型" - }, - "WorkflowBranchRequest": { - "properties": { - "branch_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Name", - "description": "分支名", - "default": "" - }, - "workflow": { - "$ref": "#/components/schemas/WorkflowConfig" - } - }, - "type": "object", - "required": [ - "workflow" - ], - "title": "WorkflowBranchRequest", - "description": "创建工作流分支 请求模型" - }, - "WorkflowConfig": { - "properties": { - "moi_workflow": { - "anyOf": [ - { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Moi Workflow", - "description": "MOI工作流配置" - }, - "components": { - "anyOf": [ - { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Components", - "description": "组件配置" - }, - "connections": { - "anyOf": [ - { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Connections", - "description": "连接配置" - }, - "edges": { - "anyOf": [ - { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Edges", - "description": "边配置" - }, - "extra_components": { - "anyOf": [ - { - "items": { - "additionalProperties": true, - "type": "object" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Extra Components", - "description": "额外组件配置" - } - }, - "type": "object", - "title": "WorkflowConfig", - "description": "工作流配置" - }, - "WorkflowConfigResponse": { - "properties": { - "lang": { - "type": "string", - "title": "Lang", - "description": "语言", - "default": "zh-CN" - }, - "file_types": { - "items": { - "$ref": "#/components/schemas/FileTypeItem" - }, - "type": "array", - "title": "File Types", - "description": "支持的文件类型枚举值" - }, - "augmentation_types": { - "items": { - "$ref": "#/components/schemas/StrItem" - }, - "type": "array", - "title": "Augmentation Types", - "description": "增强类型" - }, - "json_num_per_block": { - "items": { - "$ref": "#/components/schemas/IntItem" - }, - "type": "array", - "title": "Json Num Per Block", - "description": "单切片生成JSON数" - }, - "json_schema_str": { - "additionalProperties": true, - "type": "object", - "title": "Json Schema Str", - "description": "JSON示例" - }, - "json_schema_types": { - "items": { - "$ref": "#/components/schemas/JsonSchemaType" - }, - "type": "array", - "title": "Json Schema Types", - "description": "JSON Schema 类型" - }, - "json_schema_templates": { - "additionalProperties": { - "additionalProperties": true, - "type": "object" - }, - "propertyNames": { - "$ref": "#/components/schemas/JsonSchemaTypeEnum" - }, - "type": "object", - "title": "Json Schema Templates", - "description": "JSON Schema 模板" - }, - "use_document_count": { - "type": "integer", - "title": "Use Document Count", - "description": "指令生成依赖样本数", - "default": 30 - }, - "intervals": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "Intervals", - "description": "时间间隔(分钟)" - }, - "split_by": { - "items": { - "$ref": "#/components/schemas/StrItem" - }, - "type": "array", - "title": "Split By", - "description": "分割方式列表" - }, - "audio_config": { - "$ref": "#/components/schemas/AudioConfig", - "description": "音视频配置参数" - }, - "compatibility_config": { - "anyOf": [ - { - "additionalProperties": { - "$ref": "#/components/schemas/CompatibilityConfig" - }, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Compatibility Config", - "description": "兼容性配置" - }, - "txt_embedding_models": { - "items": { - "$ref": "#/components/schemas/EmbeddingItem" - }, - "type": "array", - "title": "Txt Embedding Models", - "description": "文本嵌入模型列表" - }, - "ocr_models": { - "items": { - "$ref": "#/components/schemas/StrItem" - }, - "type": "array", - "title": "Ocr Models", - "description": "OCR模型列表" - }, - "image_caption_models": { - "items": { - "$ref": "#/components/schemas/StrItem" - }, - "type": "array", - "title": "Image Caption Models", - "description": "Caption模型列表" - }, - "data_augmentation_models": { - "items": { - "$ref": "#/components/schemas/StrItem" - }, - "type": "array", - "title": "Data Augmentation Models", - "description": "数据增强模型列表" - }, - "structed_extraction_models": { - "items": { - "$ref": "#/components/schemas/StrItem" - }, - "type": "array", - "title": "Structed Extraction Models", - "description": "结构化提取模型列表" - } - }, - "type": "object", - "title": "WorkflowConfigResponse", - "description": "配置数据模型" - }, - "WorkflowDetailResponse": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "工作流ID" - }, - "name": { - "type": "string", - "title": "Name", - "description": "工作流名称" - }, - "source_volume_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Ids", - "description": "源数据卷列表" - }, - "source_volume_names": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Names", - "description": "源数据卷列表" - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标数据卷" - }, - "target_volume_name": { - "type": "string", - "title": "Target Volume Name", - "description": "目标数据卷" - }, - "file_types": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "File Types", - "description": "文件类型列表" - }, - "files": { - "items": { - "$ref": "#/components/schemas/SourceFileInfo" - }, - "type": "array", - "title": "Files", - "description": "指定文件的列表" - }, - "process_mode": { - "$ref": "#/components/schemas/ProcessModeConfig", - "description": "处理模式配置" - }, - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "created_at": { - "type": "integer", - "title": "Created At", - "description": "创建时间" - }, - "creator": { - "type": "string", - "title": "Creator", - "description": "创建者" - }, - "updated_at": { - "type": "integer", - "title": "Updated At", - "description": "更新时间" - }, - "modifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Modifier", - "description": "更新者" - }, - "status": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Status", - "description": "状态" - }, - "workflow": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowConfig" - }, - { - "type": "null" - } - ], - "description": "工作流配置" - }, - "branch_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Id", - "description": "分支名ID" - }, - "branch_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Name", - "description": "分支名" - }, - "branch_status": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Branch Status", - "description": "分支状态" - }, - "branch_volume_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Volume Id", - "description": "分支目标数据卷ID" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version", - "description": "版本号", - "default": "1" - }, - "branches": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/WorkflowBranchItem" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Branches", - "description": "分支信息", - "default": [] - }, - "content": { - "additionalProperties": true, - "type": "object", - "title": "Content", - "description": "工作流扩展说明" - } - }, - "type": "object", - "required": [ - "id", - "name", - "source_volume_ids", - "source_volume_names", - "target_volume_id", - "target_volume_name", - "file_types", - "files", - "process_mode", - "created_at", - "creator", - "updated_at" - ], - "title": "WorkflowDetailResponse", - "description": "工作流详情响应模型", - "example": { - "branch_name": "string", - "branch_status": 0, - "branch_volume_id": "string", - "branches": [ - { - "branch_id": "xxxx-xxx-xx-xxxxx", - "branch_name": "string", - "branch_status": 0, - "branch_volume_id": "string", - "created_at": 0, - "creator": "string", - "modified": "string", - "updated_at": 0, - "workflow": { - "components": [ - {} - ], - "connections": [ - {} - ], - "edges": [ - {} - ], - "extra_components": [ - {} - ] - } - } - ], - "created_at": 0, - "creator": "string", - "file_types": [ - 0 - ], - "id": "string", - "modifier": "string", - "name": "string", - "process_mode": { - "interval": 0, - "offset": 0 - }, - "source_volume_ids": [ - "string" - ], - "source_volume_names": [ - "string" - ], - "status": 0, - "target_volume_id": "string", - "target_volume_name": "string (deprecated at moi 3.2.4)", - "updated_at": 0, - "version": "1", - "workflow": { - "components": [ - {} - ], - "connections": [ - {} - ], - "edges": [ - {} - ], - "extra_components": [ - {} - ] - } - } - }, - "WorkflowJobStatus": { - "type": "integer", - "enum": [ - 0, - 1, - 2, - 3 - ], - "title": "WorkflowJobStatus", - "description": "工作流作业状态枚举" - }, - "WorkflowJobs": { - "properties": { - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "version": { - "type": "string", - "title": "Version", - "description": "版本号", - "default": "1" - }, - "description": { - "type": "string", - "maxLength": 255, - "title": "Description" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" - }, - "id": { - "type": "string", - "title": "Id" - }, - "user_id": { - "type": "string", - "title": "User Id", - "description": "DC user id", - "default": "dc_user_id" - }, - "workflow_name": { - "type": "string", - "title": "Workflow Name", - "description": "工作流名称" - }, - "workflow_meta_id": { - "type": "string", - "title": "Workflow Meta Id", - "description": "工作流元数据ID" - }, - "workflow_branch_id": { - "type": "string", - "title": "Workflow Branch Id", - "description": "工作流分支ID" - }, - "app_id": { - "type": "string", - "title": "App Id", - "description": "应用ID" - }, - "title": { - "type": "string", - "maxLength": 255, - "title": "Title", - "description": "标题", - "default": "Title" - }, - "start_time": { - "type": "string", - "format": "date-time", - "title": "Start Time", - "description": "开始时间" - }, - "end_time": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ], - "title": "End Time", - "description": "结束时间" - }, - "duration": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Duration", - "description": "处理时长(秒)" - }, - "file_types": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "File Types", - "description": "文件类型数组" - }, - "source_volume_names": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Names", - "description": "源卷名称数组" - }, - "source_volume_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Ids", - "description": "源卷ID数组" - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标卷ID" - }, - "target_volume_name": { - "type": "string", - "title": "Target Volume Name", - "description": "目标卷ID" - }, - "status": { - "type": "integer", - "title": "Status", - "description": "状态" - }, - "total_count": { - "type": "integer", - "title": "Total Count", - "description": "数据总量" - }, - "reason": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Reason", - "description": "原因" - }, - "flow_yaml": { - "type": "string", - "title": "Flow Yaml", - "description": "工作流YAML配置" - }, - "origin_flow_yaml": { - "type": "string", - "title": "Origin Flow Yaml", - "description": "原始工作流YAML配置" - }, - "branch_name": { - "type": "string", - "title": "Branch Name", - "description": "分支名" - } - }, - "type": "object", - "required": [ - "workflow_name", - "workflow_meta_id", - "workflow_branch_id", - "app_id", - "start_time", - "target_volume_id", - "target_volume_name", - "status", - "total_count", - "flow_yaml", - "origin_flow_yaml", - "branch_name" - ], - "title": "WorkflowJobs", - "description": "工作流作业数据库模型" - }, - "WorkflowListItem": { - "properties": { - "id": { - "type": "string", - "title": "Id", - "description": "工作流ID" - }, - "name": { - "type": "string", - "title": "Name", - "description": "工作流名称" - }, - "created_at": { - "type": "integer", - "title": "Created At", - "description": "创建时间" - }, - "creator": { - "type": "string", - "title": "Creator", - "description": "创建者" - }, - "updated_at": { - "type": "integer", - "title": "Updated At", - "description": "更新时间" - }, - "modifier": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Modifier", - "description": "更新者" - }, - "source_volume_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Ids", - "description": "源数据卷列表" - }, - "source_volume_names": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Names", - "description": "源数据卷列表" - }, - "file_types": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "File Types", - "description": "文件类型列表" - }, - "files": { - "items": { - "$ref": "#/components/schemas/SourceFileInfo" - }, - "type": "array", - "title": "Files", - "description": "指定文件的列表" - }, - "content": { - "additionalProperties": true, - "type": "object", - "title": "Content", - "description": "工作流扩展说明" - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标数据卷" - }, - "target_volume_name": { - "type": "string", - "title": "Target Volume Name", - "description": "目标数据卷" - }, - "process_mode": { - "$ref": "#/components/schemas/ProcessModeConfig", - "description": "处理模式配置" - }, - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "status": { - "type": "integer", - "title": "Status", - "description": "状态" - }, - "version": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Version", - "description": "版本号" - }, - "branch_total": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Branch Total", - "description": "分支数量" - }, - "branch_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Id", - "description": "分支ID" - }, - "branch_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Name", - "description": "分支名" - }, - "branch_status": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "null" - } - ], - "title": "Branch Status", - "description": "分支状态" - }, - "branch_volume_id": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Volume Id", - "description": "分支目标数据卷ID" - } - }, - "type": "object", - "required": [ - "id", - "name", - "created_at", - "creator", - "updated_at", - "modifier", - "source_volume_ids", - "source_volume_names", - "file_types", - "files", - "target_volume_id", - "target_volume_name", - "process_mode", - "status" - ], - "title": "WorkflowListItem", - "description": "索引工作流列表项模型" - }, - "WorkflowListResponse": { - "properties": { - "total": { - "type": "integer", - "title": "Total", - "description": "总数" - }, - "workflows": { - "items": { - "$ref": "#/components/schemas/WorkflowListItem" - }, - "type": "array", - "title": "Workflows", - "description": "工作流列表" - } - }, - "type": "object", - "required": [ - "total", - "workflows" - ], - "title": "WorkflowListResponse", - "description": "索引工作流列表响应模型" - }, - "WorkflowMeta": { - "properties": { - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "version": { - "type": "string", - "title": "Version", - "description": "版本号", - "default": "1" - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "updated_at": { - "type": "string", - "format": "date-time", - "title": "Updated At" - }, - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "maxLength": 255, - "title": "Name" - }, - "user_id": { - "type": "string", - "maxLength": 64, - "title": "User Id", - "description": "用户ID" - }, - "group_id": { - "type": "string", - "title": "Group Id", - "description": "组ID,默认值为id" - }, - "flow_interval": { - "type": "integer", - "title": "Flow Interval", - "description": "处理周期" - }, - "flow_offset": { - "type": "integer", - "title": "Flow Offset", - "description": "周期为天时的具体时间" - }, - "creator": { - "type": "string", - "maxLength": 255, - "title": "Creator" - }, - "modifier": { - "type": "string", - "maxLength": 255, - "title": "Modifier" - }, - "file_types": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "File Types", - "description": "文件类型数组" - }, - "source_volume_ids": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Ids", - "description": "源卷ID数组" - }, - "source_volume_names": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Names", - "description": "源卷名称数组" - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标卷ID" - }, - "target_volume_name": { - "type": "string", - "title": "Target Volume Name", - "description": "目标卷name" - }, - "files": { - "items": { - "$ref": "#/components/schemas/SourceFileInfo" - }, - "type": "array", - "title": "Files", - "description": "指定文件列表" - }, - "content": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Content", - "description": "工作流扩展说明" - } - }, - "type": "object", - "required": [ - "name", - "user_id", - "group_id", - "flow_interval", - "flow_offset", - "creator", - "modifier", - "target_volume_id", - "target_volume_name" - ], - "title": "WorkflowMeta", - "description": "工作流作业元数据" - }, - "WorkflowRequest": { - "properties": { - "name": { - "type": "string", - "title": "Name", - "description": "工作流名称" - }, - "source_volume_names": { - "items": { - "type": "string" - }, - "type": "array", - "title": "Source Volume Names", - "description": "源数据卷列表名字" - }, - "source_volume_ids": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "Source Volume Ids", - "description": "源数据卷列表id" - }, - "file_types": { - "items": { - "type": "integer" - }, - "type": "array", - "title": "File Types", - "description": "文件类型列表" - }, - "process_mode": { - "$ref": "#/components/schemas/ProcessModeConfig", - "description": "处理模式配置" - }, - "priority": { - "type": "integer", - "title": "Priority", - "description": "优先级", - "default": 300 - }, - "target_volume_id": { - "type": "string", - "title": "Target Volume Id", - "description": "目标数据卷id" - }, - "target_volume_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Target Volume Name", - "description": "目标数据卷name", - "default": "" - }, - "create_target_volume_name": { - "type": "string", - "title": "Create Target Volume Name", - "description": "创建目标数据卷名称" - }, - "workflow": { - "$ref": "#/components/schemas/WorkflowConfig" - }, - "branch_name": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Branch Name", - "description": "分支名", - "default": "main" - }, - "files": { - "anyOf": [ - { - "items": { - "$ref": "#/components/schemas/SourceFileInfo" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Files", - "description": "文件列表" - }, - "content": { - "anyOf": [ - { - "additionalProperties": true, - "type": "object" - }, - { - "type": "null" - } - ], - "title": "Content", - "description": "工作流额外说明" - } - }, - "type": "object", - "required": [ - "name", - "source_volume_names", - "source_volume_ids", - "file_types", - "process_mode", - "target_volume_id", - "create_target_volume_name", - "workflow" - ], - "title": "WorkflowRequest", - "description": "创建索引工作流请求模型", - "example": { - "branch_name": "", - "create_target_volume_name": "", - "file_types": [ - 3 - ], - "files": [ - { - "file_name": "file_name_1", - "id": 1901538660121604001 - }, - { - "file_name": "file_name_2", - "id": 1901538660121604002 - } - ], - "name": "source test2", - "process_mode": { - "interval": 0, - "offset": 0 - }, - "source_volume_ids": [ - "1881900953900548096" - ], - "source_volume_names": [ - "xsw-folder-1" - ], - "target_volume_id": "8213c46a", - "target_volume_name": "string (deprecated at moi 3.2.4)", - "workflow": { - "components": [ - { - "component_id": "DocumentCleaner_1737534316590", - "init_parameters": { - "ascii_only": false, - "keep_id": false, - "remove_empty_lines": true, - "remove_extra_whitespaces": true, - "remove_regex": [ - "([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+)|https?://[^\\s]+" - ], - "remove_repeated_substrings": false - }, - "input_keys": {}, - "intro": "DocumentCleaner", - "name": "DocumentCleaner", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.preprocessors.document_cleaner.DocumentCleaner" - }, - { - "component_id": "DocumentCleaner-ImageCaption_1737534316590", - "init_parameters": { - "ascii_only": false, - "keep_id": false, - "remove_empty_lines": true, - "remove_extra_whitespaces": true, - "remove_regex": [ - "([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+)|https?://[^\\s]+" - ], - "remove_repeated_substrings": false - }, - "input_keys": {}, - "intro": "DocumentCleaner-ImageCaption", - "name": "DocumentCleaner-ImageCaption", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.preprocessors.document_cleaner.DocumentCleaner" - }, - { - "component_id": "DocumentCleaner-ImageOCR_1737534316590", - "init_parameters": { - "ascii_only": false, - "keep_id": false, - "remove_empty_lines": true, - "remove_extra_whitespaces": true, - "remove_regex": [ - "([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+)|https?://[^\\s]+" - ], - "remove_repeated_substrings": false - }, - "input_keys": {}, - "intro": "DocumentCleaner-ImageOCR", - "name": "DocumentCleaner-ImageOCR", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.preprocessors.document_cleaner.DocumentCleaner" - }, - { - "component_id": "DocumentEmbedder_1737534316590", - "init_parameters": { - "api_base_url": "https://api.siliconflow.cn/v1", - "api_key": { - "env_vars": [ - "OPENAI_API_KEY" - ], - "strict": true, - "type": "env_var" - }, - "batch_size": 32, - "embedding_separator": "\\n", - "meta_fields_to_embed": [], - "model": "", - "prefix": "", - "progress_bar": true, - "suffix": "" - }, - "input_keys": {}, - "intro": "DocumentEmbedder", - "name": "DocumentEmbedder", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.embedders.openai_document_embedder.OpenAIDocumentEmbedder" - }, - { - "component_id": "DocumentJoiner_1737534316590", - "init_parameters": { - "join_mode": "concatenate", - "sort_by_score": true - }, - "input_keys": {}, - "intro": "DocumentJoiner", - "name": "DocumentJoiner", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.joiners.document_joiner.DocumentJoiner" - }, - { - "component_id": "DocumentJoiner-Result_1737534316590", - "init_parameters": { - "join_mode": "concatenate", - "sort_by_score": true - }, - "input_keys": {}, - "intro": "DocumentJoiner-Result", - "name": "DocumentJoiner-Result", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.joiners.document_joiner.DocumentJoiner" - }, - { - "component_id": "DocumentSplitter_1737534316590", - "init_parameters": { - "split_by": "word", - "split_length": 800, - "split_overlap": 200, - "split_threshold": 0 - }, - "input_keys": {}, - "intro": "DocumentSplitter", - "name": "DocumentSplitter", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.preprocessors.document_splitter.DocumentSplitter" - }, - { - "component_id": "DocumentWriter_1737534316590", - "init_parameters": { - "document_store": { - "init_parameters": { - "connection_string": { - "env_vars": [ - "DATABASE_URI" - ], - "strict": true, - "type": "env_var" - }, - "embedding_dimension": 1024, - "keyword_index_name": "haystack_keyword_index", - "recreate_table": true, - "table_name": "embedding_results", - "vector_function": "cosine_similarity" - }, - "type": "byoa.integrations.document_stores.mo_document_store.MOIDocumentStore" - }, - "policy": "NONE" - }, - "input_keys": {}, - "intro": "DocumentWriter", - "name": "DocumentWriter", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.writers.document_writer.DocumentWriter" - }, - { - "component_id": "FileRouterComponent_1737534316590", - "init_parameters": { - "mime_types": [ - "text/plain", - "text/markdown", - "image/.*", - "application/pdf", - "application/vnd.openxmlformats-officedocument.wordprocessingml.document", - "application/vnd.openxmlformats-officedocument.presentationml.presentation" - ] - }, - "input_keys": {}, - "intro": "FileRouterComponent", - "name": "FileTypeRouter", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.routers.file_type_router.FileTypeRouter" - }, - { - "component_id": "ImageCaptionToDocument_1737534316590", - "init_parameters": {}, - "input_keys": {}, - "intro": "ImageCaptionToDocument", - "name": "ImageCaptionToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "byoa.integrations.components.converters.image_caption_to_document.ImageCaptionToDocument" - }, - { - "component_id": "ImageOCRToDocument_1737534316590", - "init_parameters": { - "model": "", - "tokenizer": "stepfun-ai/GOT-OCR2_0" - }, - "input_keys": {}, - "intro": "ImageOCRToDocument", - "name": "ImageOCRToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "byoa.integrations.components.converters.image_ocr_to_document.ImageOCRToDocument" - }, - { - "component_id": "DOCXToDocument_1737534316592", - "init_parameters": {}, - "input_keys": {}, - "intro": "DOCXToDocument", - "name": "DOCXToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.converters.docx.DOCXToDocument" - }, - { - "component_id": "PPTXToDocument_1737534316592", - "init_parameters": {}, - "input_keys": {}, - "intro": "PPTXToDocument", - "name": "PPTXToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.converters.pptx.PPTXToDocument" - }, - { - "component_id": "ImageToDocument_1737534316590", - "init_parameters": { - "image_process_types": [ - "caption", - "ocr" - ] - }, - "input_keys": {}, - "intro": "ImageToDocument", - "name": "ImageToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "byoa.integrations.components.converters.image_to_document.ImageToDocument" - }, - { - "component_id": "MagicPDFToDocument_1737534316590", - "init_parameters": { - "image_process_types": [ - "caption", - "ocr" - ] - }, - "input_keys": {}, - "intro": "MagicPDFToDocument", - "name": "MagicPDFToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "byoa.integrations.components.converters.magic_pdf_to_document.MagicPDFToDocument" - }, - { - "component_id": "MarkdownToDocument_1737534316590", - "init_parameters": { - "progress_bar": false, - "table_to_single_line": false - }, - "input_keys": {}, - "intro": "MarkdownToDocument", - "name": "MarkdownToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.converters.markdown.MarkdownToDocument" - }, - { - "component_id": "MetadataRouter_1737534316590", - "init_parameters": { - "rules": { - "image_caption": { - "conditions": [ - { - "field": "meta.content_type", - "operator": "==", - "value": "image" - }, - { - "field": "meta.process_type", - "operator": "==", - "value": "caption" - } - ], - "operator": "AND" - }, - "image_ocr": { - "conditions": [ - { - "field": "meta.content_type", - "operator": "==", - "value": "image" - }, - { - "field": "meta.process_type", - "operator": "==", - "value": "ocr" - } - ], - "operator": "AND" - }, - "text": { - "conditions": [ - { - "field": "meta.content_type", - "operator": "==", - "value": "text" - } - ], - "operator": "AND" - } - } - }, - "input_keys": {}, - "intro": "MetadataRouter", - "name": "MetadataRouter", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.routers.metadata_router.MetadataRouter" - }, - { - "component_id": "PythonExecutor_1737534316590", - "init_parameters": { - "python_code": "// 下面是一个将 documents 中 content 删除所有前导和尾随空格的例子\\ndef process_documents(documents):\\n processed_documents = []\\n for doc in documents:\\n if isinstance(doc.content, str) and len(doc.content) > 0:\\n doc.content = doc.content.strip()\\n processed_documents.append(doc)\\n return {\"documents\": processed_documents}" - }, - "input_keys": {}, - "intro": "PythonExecutor", - "name": "PythonExecutor", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "byoa.integrations.components.python_executor.PythonExecutor" - }, - { - "component_id": "TextFileToDocument_1737534316590", - "init_parameters": { - "encoding": "utf8" - }, - "input_keys": {}, - "intro": "TextFileToDocument", - "name": "TextFileToDocument", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "haystack.components.converters.txt.TextFileToDocument" - }, - { - "component_id": "DocumentContentImageFiller_1737534316590", - "init_parameters": {}, - "input_keys": {}, - "intro": "DocumentContentImageFiller", - "name": "DocumentContentImageFiller", - "output_keys": {}, - "position": { - "x": 0, - "y": 0 - }, - "type": "byoa.integrations.components.converters.document_content_image_filler.DocumentContentImageFiller" - }, - { - "component_id": "DataAugmentation_1737534316590", - "init_parameters": { - "json_num_per_block": 5, - "json_schema_str": { - "instruction": "公司最近的战略计划是什么?", - "response": "公司计划在未来两年重点拓展东南亚和欧洲市场,并已设立办事处和开始本地化招聘。" - }, - "type": "general", - "use_document_count": 30 - }, - "intro": "DataAugmentation", - "name": "DataAugmentation", - "position": { - "x": 0, - "y": 0 - }, - "type": "byoa.integrations.components.data_augmentation.DataAugmentation" - } - ], - "connections": [ - { - "receiver": "TextFileToDocument.sources", - "sender": "FileRouterComponent.text/plain" - }, - { - "receiver": "MarkdownToDocument.sources", - "sender": "FileRouterComponent.text/markdown" - }, - { - "receiver": "ImageToDocument.sources", - "sender": "FileRouterComponent.image/.*" - }, - { - "receiver": "DOCXToDocument.sources", - "sender": "FileRouterComponent.application/vnd.openxmlformats-officedocument.wordprocessingml.document" - }, - { - "receiver": "PPTXToDocument.sources", - "sender": "FileRouterComponent.application/vnd.openxmlformats-officedocument.presentationml.presentation" - }, - { - "receiver": "MagicPDFToDocument.sources", - "sender": "FileRouterComponent.application/pdf" - }, - { - "receiver": "DocumentJoiner.documents", - "sender": "TextFileToDocument.documents" - }, - { - "receiver": "DocumentJoiner.documents", - "sender": "MarkdownToDocument.documents" - }, - { - "receiver": "DocumentJoiner.documents", - "sender": "MagicPDFToDocument.documents" - }, - { - "receiver": "DocumentJoiner.documents", - "sender": "ImageToDocument.documents" - }, - { - "receiver": "DocumentJoiner.documents", - "sender": "DOCXToDocument.documents" - }, - { - "receiver": "DocumentJoiner.documents", - "sender": "PPTXToDocument.documents" - }, - { - "receiver": "MetadataRouter.documents", - "sender": "DocumentJoiner.documents" - }, - { - "receiver": "DocumentCleaner.documents", - "sender": "MetadataRouter.text" - }, - { - "receiver": "ImageOCRToDocument.documents", - "sender": "MetadataRouter.image" - }, - { - "receiver": "ImageCaptionToDocument.documents", - "sender": "MetadataRouter.image" - }, - { - "receiver": "DocumentSplitter.documents", - "sender": "DocumentCleaner.documents" - }, - { - "receiver": "DocumentJoiner-Result.documents", - "sender": "DocumentSplitter.documents" - }, - { - "receiver": "DocumentCleaner-ImageOCR.documents", - "sender": "ImageOCRToDocument.documents" - }, - { - "receiver": "DocumentJoiner-Result.documents", - "sender": "DocumentCleaner-ImageOCR.documents" - }, - { - "receiver": "DocumentCleaner-ImageCaption.documents", - "sender": "ImageCaptionToDocument.documents" - }, - { - "receiver": "DocumentJoiner-Result.documents", - "sender": "DocumentCleaner-ImageCaption.documents" - }, - { - "receiver": "PythonExecutor.documents", - "sender": "DocumentJoiner-Result.documents" - }, - { - "receiver": "DocumentEmbedder.documents", - "sender": "PythonExecutor.documents" - }, - { - "receiver": "DocumentContentImageFiller.documents", - "sender": "DocumentEmbedder.documents" - }, - { - "receiver": "DocumentWriter.documents", - "sender": "DocumentContentImageFiller.documents" - }, - { - "receiver": "DataAugmentation.count", - "sender": "DocumentWriter.documents_written" - } - ], - "edges": [], - "extra_components": [], - "moi_workflow": [ - { - "ui object": "ui object" - } - ] - } - } - }, - "WorkflowTplListResp": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/WorkflowTplResp" - }, - "type": "array", - "title": "Items" - } - }, - "type": "object", - "required": [ - "items" - ], - "title": "WorkflowTplListResp", - "description": "工作流模板列表响应模型" - }, - "WorkflowTplResp": { - "properties": { - "id": { - "type": "string", - "title": "Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "tpl_desc": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Tpl Desc" - }, - "workflow": { - "anyOf": [ - { - "$ref": "#/components/schemas/WorkflowConfig" - }, - { - "type": "null" - } - ] - }, - "usage_desc": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Usage Desc" - }, - "pdf_url": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "null" - } - ], - "title": "Pdf Url" - }, - "png_urls": { - "anyOf": [ - { - "items": { - "type": "string" - }, - "type": "array" - }, - { - "type": "null" - } - ], - "title": "Png Urls" - } - }, - "type": "object", - "required": [ - "id", - "name" - ], - "title": "WorkflowTplResp", - "description": "工作流模板响应模型" - } - } - } -}