Skip to content

Commit 9dc4064

Browse files
committed
2 parents 498fab2 + 2d57ca4 commit 9dc4064

3 files changed

Lines changed: 23 additions & 27 deletions

File tree

sdk/api.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,20 +169,22 @@ Accept: application/json
169169
"target": 1,
170170
"threads": 1,
171171
"answer_duration": [60, 120],
172+
"random_ip_enabled": false,
172173
"proxy_source": "default",
174+
"custom_proxy_api": "",
175+
"proxy_area_code": "",
176+
"random_ip_user_id": 0,
177+
"random_ip_device_id": "",
178+
"ip_extract_endpoint": "",
179+
"random_ip_lease_minute": 1,
173180
"random_ua_keys": ["wechat", "mobile", "pc"],
174181
"random_ua_ratios": {
175182
"wechat": 33,
176183
"mobile": 33,
177184
"pc": 34
178185
},
179-
"fail_stop_enabled": true,
180-
"pause_on_aliyun_captcha": true,
181186
"reliability_mode_enabled": true,
182187
"psycho_target_alpha": 0.85,
183-
"ai_mode": "free",
184-
"ai_provider": "deepseek",
185-
"ai_api_protocol": "auto",
186188
"reverse_fill_format": "auto",
187189
"reverse_fill_start_row": 1,
188190
"reverse_fill_threads": 1,

sdk/index.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ outline: deep
44

55
# SDK
66

7-
这里说明如何用 [SurveyCore](https://github.com/SurvyeController/SurveyCore) 来创建和管理问卷提交任务。
7+
这里说明如何用 [SurveyCore](https://github.com/SurveyController/SurveyCore) 来创建和管理问卷提交任务。
88

99
## 文档结构
1010

@@ -51,11 +51,14 @@ Accept: application/json
5151

5252
```json
5353
{
54-
"error": "错误原因"
54+
"error": "错误原因",
55+
"code": "validation_error",
56+
"message": "错误原因",
57+
"detail": "调试详情"
5558
}
5659
```
5760

58-
当前版本没有独立的业务错误码字段。错误处理以 HTTP 状态码为准
61+
客户端应优先看 HTTP 状态码和 `code`
5962

6063
## 推荐接入流程
6164

sdk/schemas.md

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,19 @@ outline: deep
2020
| `submit_interval` | `[number, number]` | 两次提交之间的随机等待范围,单位秒。 |
2121
| `answer_duration` | `[number, number]` | 单份问卷显示作答时长范围,单位秒。 |
2222
| `answer_datetime_window` | `[string, string]` | 作答时间窗口,格式建议为 `YYYY-MM-DD HH:mm:ss`|
23-
| `random_ip_enabled` | `boolean` | 是否启用随机代理 IP。 |
24-
| `proxy_source` | `string` | 代理来源。默认 `default`|
25-
| `custom_proxy_api` | `string` | 自定义代理 API。 |
26-
| `proxy_area_code` | `string \| null` | 代理地区编码。 |
27-
| `random_ip_user_id` | `number` | 默认代理源的用户 ID。 |
28-
| `random_ip_device_id` | `string` | 默认代理源的设备 ID。 |
29-
| `ip_extract_endpoint` | `string` | 代理提取接口。 |
30-
| `random_ip_lease_minute` | `number` | 代理租约分钟数。 |
3123
| `random_ua_enabled` | `boolean` | 是否启用随机 User-Agent。 |
3224
| `random_ua_keys` | `string[]` | User-Agent 类型。默认 `wechat``mobile``pc`|
3325
| `random_ua_ratios` | `object` | User-Agent 类型权重。 |
34-
| `fail_stop_enabled` | `boolean` | 是否在失败过多时停止。 |
35-
| `pause_on_aliyun_captcha` | `boolean` | 遇到阿里云验证码时是否暂停。 |
26+
| `random_ip_enabled` | `boolean` | 是否启用随机 IP。启用后只在提交前取用代理。 |
27+
| `proxy_source` | `string` | 代理来源。可选值:`default``benefit``custom`|
28+
| `custom_proxy_api` | `string` | 自定义代理 API 地址。`proxy_source``custom` 时使用。 |
29+
| `proxy_area_code` | `string` | 官方随机 IP 地区编码。 |
30+
| `random_ip_user_id` | `number` | 官方随机 IP 用户 ID。 |
31+
| `random_ip_device_id` | `string` | 官方随机 IP 设备 ID。 |
32+
| `ip_extract_endpoint` | `string` | 官方随机 IP 提取接口覆盖地址。 |
33+
| `random_ip_lease_minute` | `number` | 官方随机 IP 租约分钟数。默认 `1`|
3634
| `reliability_mode_enabled` | `boolean` | 是否启用信度优化。 |
3735
| `psycho_target_alpha` | `number` | 预期 Cronbach's α。默认 `0.85`|
38-
| `ai_mode` | `string` | AI 填空模式。默认 `free`|
39-
| `ai_provider` | `string` | AI 服务商。默认 `deepseek`|
40-
| `ai_api_key` | `string` | AI API Key。 |
41-
| `ai_base_url` | `string` | AI 接口地址。 |
42-
| `ai_api_protocol` | `string` | AI 协议。默认 `auto`|
43-
| `ai_model` | `string` | AI 模型名。 |
44-
| `ai_system_prompt` | `string` | AI 系统提示词。 |
4536
| `reverse_fill_enabled` | `boolean` | 是否启用反向填充。 |
4637
| `reverse_fill_source_path` | `string` | 反向填充数据源路径。 |
4738
| `reverse_fill_format` | `string` | 反向填充格式。默认 `auto`|
@@ -70,9 +61,9 @@ outline: deep
7061
| `survey_provider` | `string` | 问卷平台。 |
7162
| `provider_question_id` | `string` | 平台原始题目 ID。 |
7263
| `provider_page_id` | `string` | 平台原始分页 ID。 |
73-
| `ai_enabled` | `boolean` | 该填空题是否启用 AI。 |
64+
| `ai_enabled` | `boolean` | 是否让服务端用本地 AI 配置生成填空答案|
7465
| `multi_text_blank_modes` | `string[]` | 多项填空每个空的生成模式。 |
75-
| `multi_text_blank_ai_flags` | `boolean[]` | 多项填空每个空是否启用 AI。 |
66+
| `multi_text_blank_ai_flags` | `boolean[]` | 多项填空每个空是否启用服务端 AI。 |
7667
| `multi_text_blank_int_ranges` | `number[][]` | 多项填空随机整数范围。 |
7768
| `text_random_mode` | `string` | 填空随机模式。可选值:`none``name``mobile``id_card``integer`|
7869
| `text_random_int_range` | `[number, number]` | 随机整数范围。 |

0 commit comments

Comments
 (0)