@alicloud/qweneduaisuite20261102 1.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/client.d.ts +117 -62
  2. package/dist/client.js +125 -80
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/ActivateQwenEduApiResponseBody.d.ts +30 -0
  5. package/dist/models/ActivateQwenEduApiResponseBody.js.map +1 -1
  6. package/dist/models/CreateEduHomeworkCorrectSubmitRequest.d.ts +28 -0
  7. package/dist/models/CreateEduHomeworkCorrectSubmitRequest.js.map +1 -1
  8. package/dist/models/CreateEduHomeworkCorrectSubmitResponseBody.d.ts +143 -10
  9. package/dist/models/CreateEduHomeworkCorrectSubmitResponseBody.js.map +1 -1
  10. package/dist/models/CreateEduProblemSolveRequest.d.ts +26 -2
  11. package/dist/models/CreateEduProblemSolveRequest.js.map +1 -1
  12. package/dist/models/CreateEduProblemSolveResponseBody.d.ts +87 -23
  13. package/dist/models/CreateEduProblemSolveResponseBody.js +11 -35
  14. package/dist/models/CreateEduProblemSolveResponseBody.js.map +1 -1
  15. package/dist/models/GetEduHomeworkCorrectionResultRequest.d.ts +7 -0
  16. package/dist/models/GetEduHomeworkCorrectionResultRequest.js.map +1 -1
  17. package/dist/models/GetEduHomeworkCorrectionResultResponseBody.d.ts +194 -10
  18. package/dist/models/GetEduHomeworkCorrectionResultResponseBody.js.map +1 -1
  19. package/dist/models/GetQwenEduApiActivationStatusResponseBody.d.ts +37 -0
  20. package/dist/models/GetQwenEduApiActivationStatusResponseBody.js.map +1 -1
  21. package/dist/models/model.d.ts +3 -5
  22. package/dist/models/model.js +6 -10
  23. package/dist/models/model.js.map +1 -1
  24. package/package.json +1 -1
  25. package/src/client.ts +125 -82
  26. package/src/models/ActivateQwenEduApiResponseBody.ts +30 -0
  27. package/src/models/CreateEduHomeworkCorrectSubmitRequest.ts +28 -0
  28. package/src/models/CreateEduHomeworkCorrectSubmitResponseBody.ts +143 -10
  29. package/src/models/CreateEduProblemSolveRequest.ts +26 -2
  30. package/src/models/CreateEduProblemSolveResponseBody.ts +92 -43
  31. package/src/models/GetEduHomeworkCorrectionResultRequest.ts +7 -0
  32. package/src/models/GetEduHomeworkCorrectionResultResponseBody.ts +194 -10
  33. package/src/models/GetQwenEduApiActivationStatusResponseBody.ts +37 -0
  34. package/src/models/model.ts +3 -5
  35. package/dist/models/CreateEduProblemSolveShrinkRequest.d.ts +0 -23
  36. package/dist/models/CreateEduProblemSolveShrinkRequest.js +0 -60
  37. package/dist/models/CreateEduProblemSolveShrinkRequest.js.map +0 -1
  38. package/src/models/CreateEduProblemSolveShrinkRequest.ts +0 -38
package/dist/client.d.ts CHANGED
@@ -9,10 +9,16 @@ export default class Client extends OpenApi {
9
9
  [key: string]: string;
10
10
  }, endpoint: string): string;
11
11
  /**
12
- * 开通千问教育API权限
12
+ * Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
13
13
  *
14
14
  * @remarks
15
- * 开通千问教育API权限
15
+ * ## Request description
16
+ * - This operation activates the Qwen learning AI suite capability for the current Alibaba Cloud account.
17
+ * - You must call this operation first. You can call business API operations such as problem solving and grading only after `ACTIVE` is returned.
18
+ * ### Precautions
19
+ * - Both Alibaba Cloud accounts and RAM users can call this operation.
20
+ * - When a RAM user calls this operation, ensure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
21
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
16
22
  *
17
23
  * @param request - ActivateQwenEduApiRequest
18
24
  * @param headers - map
@@ -23,27 +29,32 @@ export default class Client extends OpenApi {
23
29
  [key: string]: string;
24
30
  }, runtime: $dara.RuntimeOptions): Promise<$_model.ActivateQwenEduApiResponse>;
25
31
  /**
26
- * 开通千问教育API权限
32
+ * Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
27
33
  *
28
34
  * @remarks
29
- * 开通千问教育API权限
35
+ * ## Request description
36
+ * - This operation activates the Qwen learning AI suite capability for the current Alibaba Cloud account.
37
+ * - You must call this operation first. You can call business API operations such as problem solving and grading only after `ACTIVE` is returned.
38
+ * ### Precautions
39
+ * - Both Alibaba Cloud accounts and RAM users can call this operation.
40
+ * - When a RAM user calls this operation, ensure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
41
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
30
42
  *
31
43
  * @param request - ActivateQwenEduApiRequest
32
44
  * @returns ActivateQwenEduApiResponse
33
45
  */
34
46
  activateQwenEduApi(request: $_model.ActivateQwenEduApiRequest): Promise<$_model.ActivateQwenEduApiResponse>;
35
47
  /**
36
- * 提交单页作业图片,返回任务ID及初步检测结果。
48
+ * Submits a single-page homework image and asynchronously retrieves the grading results.
37
49
  *
38
50
  * @remarks
39
- * ## 请求说明
40
- * - 该接口用于提交单页作业图片进行批改,支持通过图片URL或Base64编码的图片数据。
41
- * - 提交后会立即返回任务ID、矫正图及题目检测结果,但不包含具体的批改结论。
42
- * - 需要通过查询接口轮询获取最终的批改结果。
43
- * - 支持对图片进行透视矫正,默认开启。
44
- * - 图片要求:支持多种格式(JPEG, PNG, GIF等),推荐体积不超过1MB,最大支持15MB(Base64编码后)。
45
- * - 每次请求仅处理一张图片,多张图片需分别提交。
46
- * - `request_id`字段建议由调用方生成并传递,以便于问题排查和对账。
51
+ * ## Request description
52
+ * - This operation is used to submit a homework image to the server for question segmentation, recognition, and grading.
53
+ * - You can submit the image by using `imageBase64` or `imageUrl`. `imageBase64` is preferred.
54
+ * - The optional parameter `dewarp` specifies whether to correct the image distortion. Default value: `true`.
55
+ * - Provide `requestId` to facilitate troubleshooting and reconciliation.
56
+ * - Image size limit: The Base64-encoded image cannot exceed 15 MB.
57
+ * - All requests and responses are in JSON format.
47
58
  *
48
59
  * @param request - CreateEduHomeworkCorrectSubmitRequest
49
60
  * @param headers - map
@@ -54,86 +65,102 @@ export default class Client extends OpenApi {
54
65
  [key: string]: string;
55
66
  }, runtime: $dara.RuntimeOptions): Promise<$_model.CreateEduHomeworkCorrectSubmitResponse>;
56
67
  /**
57
- * 提交单页作业图片,返回任务ID及初步检测结果。
68
+ * Submits a single-page homework image and asynchronously retrieves the grading results.
58
69
  *
59
70
  * @remarks
60
- * ## 请求说明
61
- * - 该接口用于提交单页作业图片进行批改,支持通过图片URL或Base64编码的图片数据。
62
- * - 提交后会立即返回任务ID、矫正图及题目检测结果,但不包含具体的批改结论。
63
- * - 需要通过查询接口轮询获取最终的批改结果。
64
- * - 支持对图片进行透视矫正,默认开启。
65
- * - 图片要求:支持多种格式(JPEG, PNG, GIF等),推荐体积不超过1MB,最大支持15MB(Base64编码后)。
66
- * - 每次请求仅处理一张图片,多张图片需分别提交。
67
- * - `request_id`字段建议由调用方生成并传递,以便于问题排查和对账。
71
+ * ## Request description
72
+ * - This operation is used to submit a homework image to the server for question segmentation, recognition, and grading.
73
+ * - You can submit the image by using `imageBase64` or `imageUrl`. `imageBase64` is preferred.
74
+ * - The optional parameter `dewarp` specifies whether to correct the image distortion. Default value: `true`.
75
+ * - Provide `requestId` to facilitate troubleshooting and reconciliation.
76
+ * - Image size limit: The Base64-encoded image cannot exceed 15 MB.
77
+ * - All requests and responses are in JSON format.
68
78
  *
69
79
  * @param request - CreateEduHomeworkCorrectSubmitRequest
70
80
  * @returns CreateEduHomeworkCorrectSubmitResponse
71
81
  */
72
82
  createEduHomeworkCorrectSubmit(request: $_model.CreateEduHomeworkCorrectSubmitRequest): Promise<$_model.CreateEduHomeworkCorrectSubmitResponse>;
73
83
  /**
74
- * 通过图片URL或Base64编码接收题目,返回解题过程和结果。
84
+ * Provides question resolution services by using image URLs or Base64 encoding.
75
85
  *
76
86
  * @remarks
77
- * ## 请求说明
78
- * - 本接口支持通过单张题目图片的URL或Base64编码进行解题请求。
79
- * - 支持处理JPEG、JPG、PNG格式的图片,且图片大小不超过10MB,像素总数不超过260万。
80
- * - 请求必须携带`request_id`字段,用于链路关联和对账;建议使用UUID以保证唯一性。
81
- * - `Authorization`头部需包含有效的`appKey`,采用`Bearer <appKey>`格式。
82
- * - 接口响应为SSE流式数据,客户端应逐事件读取并解析,不得等待连接关闭后整体读取。
83
- * - 成功响应包括`message`(过程态全量解题快照)和`complete`(最终完整结果)两种事件类型。
84
- * - 错误处理分为建流前与建流后两个阶段,根据错误码及`retryable`字段决定是否重试。
85
- * - 客户端超时设置建议不低于3分钟,并确保代理层不会缓存SSE响应或提前关闭长连接。
86
- *
87
- * @param tmpReq - CreateEduProblemSolveRequest
87
+ * ## Request instructions
88
+ * - This API retrieves question resolution results by using the URL or Base64 encoding of a question image.
89
+ * - Only a single image is supported per request, and the image format must be JPG, JPEG, or PNG.
90
+ * - The image must be clear and complete. Avoid tilted, obscured, or irrelevant content.
91
+ * - Each request can process only one image. Multi-image or plain text requests are not supported.
92
+ * - The recommended image size is up to 1 MB, with a maximum limit of 10 MB. The width and height of the image must not exceed 8,000 pixels, and the total number of pixels must not exceed 2.6 million.
93
+ * - Use the HTTPS protocol to call the API and provide image URLs.
94
+ * - The user_id must be an anonymized identifier. Do not pass direct identity information such as names or phone numbers.
95
+ * - This API uses the HTTP POST method combined with Server-Sent Events (SSE) streaming response technology. The client must read the response event by event and must not wait for the connection to close before reading the entire response.
96
+ * - A successful response returns the question resolution process step by step through a series of message events and ends with a complete event. If an error occurs, an error event is returned.
97
+ * - For retryable errors such as TOO_MANY_ACTIVE_STREAMS, use an exponential backoff strategy to retry the request.
98
+ * - Set a reasonable timeout period for the client, which must be at least 3 minutes, and ensure that the proxy layer does not cache SSE responses.
99
+ *
100
+ * @param request - CreateEduProblemSolveRequest
88
101
  * @param headers - map
89
102
  * @param runtime - runtime options for this request RuntimeOptions
90
103
  * @returns CreateEduProblemSolveResponse
91
104
  */
92
- createEduProblemSolveWithSSE(tmpReq: $_model.CreateEduProblemSolveRequest, headers: {
105
+ createEduProblemSolveWithSSE(request: $_model.CreateEduProblemSolveRequest, headers: {
93
106
  [key: string]: string;
94
107
  }, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.CreateEduProblemSolveResponse, any, unknown>;
95
108
  /**
96
- * 通过图片URL或Base64编码接收题目,返回解题过程和结果。
109
+ * Provides question resolution services by using image URLs or Base64 encoding.
97
110
  *
98
111
  * @remarks
99
- * ## 请求说明
100
- * - 本接口支持通过单张题目图片的URL或Base64编码进行解题请求。
101
- * - 支持处理JPEG、JPG、PNG格式的图片,且图片大小不超过10MB,像素总数不超过260万。
102
- * - 请求必须携带`request_id`字段,用于链路关联和对账;建议使用UUID以保证唯一性。
103
- * - `Authorization`头部需包含有效的`appKey`,采用`Bearer <appKey>`格式。
104
- * - 接口响应为SSE流式数据,客户端应逐事件读取并解析,不得等待连接关闭后整体读取。
105
- * - 成功响应包括`message`(过程态全量解题快照)和`complete`(最终完整结果)两种事件类型。
106
- * - 错误处理分为建流前与建流后两个阶段,根据错误码及`retryable`字段决定是否重试。
107
- * - 客户端超时设置建议不低于3分钟,并确保代理层不会缓存SSE响应或提前关闭长连接。
108
- *
109
- * @param tmpReq - CreateEduProblemSolveRequest
112
+ * ## Request instructions
113
+ * - This API retrieves question resolution results by using the URL or Base64 encoding of a question image.
114
+ * - Only a single image is supported per request, and the image format must be JPG, JPEG, or PNG.
115
+ * - The image must be clear and complete. Avoid tilted, obscured, or irrelevant content.
116
+ * - Each request can process only one image. Multi-image or plain text requests are not supported.
117
+ * - The recommended image size is up to 1 MB, with a maximum limit of 10 MB. The width and height of the image must not exceed 8,000 pixels, and the total number of pixels must not exceed 2.6 million.
118
+ * - Use the HTTPS protocol to call the API and provide image URLs.
119
+ * - The user_id must be an anonymized identifier. Do not pass direct identity information such as names or phone numbers.
120
+ * - This API uses the HTTP POST method combined with Server-Sent Events (SSE) streaming response technology. The client must read the response event by event and must not wait for the connection to close before reading the entire response.
121
+ * - A successful response returns the question resolution process step by step through a series of message events and ends with a complete event. If an error occurs, an error event is returned.
122
+ * - For retryable errors such as TOO_MANY_ACTIVE_STREAMS, use an exponential backoff strategy to retry the request.
123
+ * - Set a reasonable timeout period for the client, which must be at least 3 minutes, and ensure that the proxy layer does not cache SSE responses.
124
+ *
125
+ * @param request - CreateEduProblemSolveRequest
110
126
  * @param headers - map
111
127
  * @param runtime - runtime options for this request RuntimeOptions
112
128
  * @returns CreateEduProblemSolveResponse
113
129
  */
114
- createEduProblemSolveWithOptions(tmpReq: $_model.CreateEduProblemSolveRequest, headers: {
130
+ createEduProblemSolveWithOptions(request: $_model.CreateEduProblemSolveRequest, headers: {
115
131
  [key: string]: string;
116
132
  }, runtime: $dara.RuntimeOptions): Promise<$_model.CreateEduProblemSolveResponse>;
117
133
  /**
118
- * 通过图片URL或Base64编码接收题目,返回解题过程和结果。
134
+ * Provides question resolution services by using image URLs or Base64 encoding.
119
135
  *
120
136
  * @remarks
121
- * ## 请求说明
122
- * - 本接口支持通过单张题目图片的URL或Base64编码进行解题请求。
123
- * - 支持处理JPEG、JPG、PNG格式的图片,且图片大小不超过10MB,像素总数不超过260万。
124
- * - 请求必须携带`request_id`字段,用于链路关联和对账;建议使用UUID以保证唯一性。
125
- * - `Authorization`头部需包含有效的`appKey`,采用`Bearer <appKey>`格式。
126
- * - 接口响应为SSE流式数据,客户端应逐事件读取并解析,不得等待连接关闭后整体读取。
127
- * - 成功响应包括`message`(过程态全量解题快照)和`complete`(最终完整结果)两种事件类型。
128
- * - 错误处理分为建流前与建流后两个阶段,根据错误码及`retryable`字段决定是否重试。
129
- * - 客户端超时设置建议不低于3分钟,并确保代理层不会缓存SSE响应或提前关闭长连接。
137
+ * ## Request instructions
138
+ * - This API retrieves question resolution results by using the URL or Base64 encoding of a question image.
139
+ * - Only a single image is supported per request, and the image format must be JPG, JPEG, or PNG.
140
+ * - The image must be clear and complete. Avoid tilted, obscured, or irrelevant content.
141
+ * - Each request can process only one image. Multi-image or plain text requests are not supported.
142
+ * - The recommended image size is up to 1 MB, with a maximum limit of 10 MB. The width and height of the image must not exceed 8,000 pixels, and the total number of pixels must not exceed 2.6 million.
143
+ * - Use the HTTPS protocol to call the API and provide image URLs.
144
+ * - The user_id must be an anonymized identifier. Do not pass direct identity information such as names or phone numbers.
145
+ * - This API uses the HTTP POST method combined with Server-Sent Events (SSE) streaming response technology. The client must read the response event by event and must not wait for the connection to close before reading the entire response.
146
+ * - A successful response returns the question resolution process step by step through a series of message events and ends with a complete event. If an error occurs, an error event is returned.
147
+ * - For retryable errors such as TOO_MANY_ACTIVE_STREAMS, use an exponential backoff strategy to retry the request.
148
+ * - Set a reasonable timeout period for the client, which must be at least 3 minutes, and ensure that the proxy layer does not cache SSE responses.
130
149
  *
131
150
  * @param request - CreateEduProblemSolveRequest
132
151
  * @returns CreateEduProblemSolveResponse
133
152
  */
134
153
  createEduProblemSolve(request: $_model.CreateEduProblemSolveRequest): Promise<$_model.CreateEduProblemSolveResponse>;
135
154
  /**
136
- * 查询批改进度、增量结果、终态结果及 Token 用量
155
+ * Queries the progress and final results of homework grading based on the task ID.
156
+ *
157
+ * @remarks
158
+ * ## Request description
159
+ * - This operation queries the status and detailed results of single-page homework grading by using the `taskId` returned when the task is submitted.
160
+ * - The caller should poll this operation at an interval of 1 to 2 seconds until the task status changes to `finished` or `failed`.
161
+ * - When the task status is `finished`, the response contains complete grading information, including question recognition, grading conclusions, dewarped images, and rendered images.
162
+ * - If the task fails (the status is `failed`), check the `message` field in the response or the specific fault information in `data`.
163
+ * - All requests and responses are in JSON format.
137
164
  *
138
165
  * @param request - GetEduHomeworkCorrectionResultRequest
139
166
  * @param headers - map
@@ -144,14 +171,32 @@ export default class Client extends OpenApi {
144
171
  [key: string]: string;
145
172
  }, runtime: $dara.RuntimeOptions): Promise<$_model.GetEduHomeworkCorrectionResultResponse>;
146
173
  /**
147
- * 查询批改进度、增量结果、终态结果及 Token 用量
174
+ * Queries the progress and final results of homework grading based on the task ID.
175
+ *
176
+ * @remarks
177
+ * ## Request description
178
+ * - This operation queries the status and detailed results of single-page homework grading by using the `taskId` returned when the task is submitted.
179
+ * - The caller should poll this operation at an interval of 1 to 2 seconds until the task status changes to `finished` or `failed`.
180
+ * - When the task status is `finished`, the response contains complete grading information, including question recognition, grading conclusions, dewarped images, and rendered images.
181
+ * - If the task fails (the status is `failed`), check the `message` field in the response or the specific fault information in `data`.
182
+ * - All requests and responses are in JSON format.
148
183
  *
149
184
  * @param request - GetEduHomeworkCorrectionResultRequest
150
185
  * @returns GetEduHomeworkCorrectionResultResponse
151
186
  */
152
187
  getEduHomeworkCorrectionResult(request: $_model.GetEduHomeworkCorrectionResultRequest): Promise<$_model.GetEduHomeworkCorrectionResultResponse>;
153
188
  /**
154
- * 千问教育API开通状态查询
189
+ * Queries whether the current account has activated Qwen education-related services.
190
+ *
191
+ * @remarks
192
+ * ## Request description
193
+ * This operation queries whether a specified Alibaba Cloud account or RAM user has successfully activated the Qwen learning AI suite. Before calling any business API operations, you must use this operation to confirm that the service status is `ACTIVE`. If the service is not activated, perform the corresponding operations based on the returned status information, such as waiting for a period of time and retrying.
194
+ * ### Precautions
195
+ * - This operation supports calls from Alibaba Cloud accounts and RAM users.
196
+ * - When a RAM user calls this operation, make sure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
197
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
198
+ * - If the status is `ACTIVATING`, retry the query after the time interval recommended by the returned `retry_after_seconds` field.
199
+ * - If a failure occurs (`FAILED`), refer to the specific error code, take corresponding measures, and then try again.
155
200
  *
156
201
  * @param request - GetQwenEduApiActivationStatusRequest
157
202
  * @param headers - map
@@ -162,7 +207,17 @@ export default class Client extends OpenApi {
162
207
  [key: string]: string;
163
208
  }, runtime: $dara.RuntimeOptions): Promise<$_model.GetQwenEduApiActivationStatusResponse>;
164
209
  /**
165
- * 千问教育API开通状态查询
210
+ * Queries whether the current account has activated Qwen education-related services.
211
+ *
212
+ * @remarks
213
+ * ## Request description
214
+ * This operation queries whether a specified Alibaba Cloud account or RAM user has successfully activated the Qwen learning AI suite. Before calling any business API operations, you must use this operation to confirm that the service status is `ACTIVE`. If the service is not activated, perform the corresponding operations based on the returned status information, such as waiting for a period of time and retrying.
215
+ * ### Precautions
216
+ * - This operation supports calls from Alibaba Cloud accounts and RAM users.
217
+ * - When a RAM user calls this operation, make sure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
218
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
219
+ * - If the status is `ACTIVATING`, retry the query after the time interval recommended by the returned `retry_after_seconds` field.
220
+ * - If a failure occurs (`FAILED`), refer to the specific error code, take corresponding measures, and then try again.
166
221
  *
167
222
  * @param request - GetQwenEduApiActivationStatusRequest
168
223
  * @returns GetQwenEduApiActivationStatusResponse
package/dist/client.js CHANGED
@@ -72,7 +72,7 @@ class Client extends openapi_core_1.default {
72
72
  this._productId = "QwenEduAiSuite";
73
73
  let gatewayClient = new gateway_pop_1.default();
74
74
  this._spi = gatewayClient;
75
- this._endpointRule = "";
75
+ this._endpointRule = "regional";
76
76
  this.checkConfig(config);
77
77
  this._endpoint = this.getEndpoint("qweneduaisuite", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
78
78
  }
@@ -86,10 +86,16 @@ class Client extends openapi_core_1.default {
86
86
  return openapi_core_2.OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
87
87
  }
88
88
  /**
89
- * 开通千问教育API权限
89
+ * Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
90
90
  *
91
91
  * @remarks
92
- * 开通千问教育API权限
92
+ * ## Request description
93
+ * - This operation activates the Qwen learning AI suite capability for the current Alibaba Cloud account.
94
+ * - You must call this operation first. You can call business API operations such as problem solving and grading only after `ACTIVE` is returned.
95
+ * ### Precautions
96
+ * - Both Alibaba Cloud accounts and RAM users can call this operation.
97
+ * - When a RAM user calls this operation, ensure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
98
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
93
99
  *
94
100
  * @param request - ActivateQwenEduApiRequest
95
101
  * @param headers - map
@@ -115,10 +121,16 @@ class Client extends openapi_core_1.default {
115
121
  return $dara.cast(await this.callApi(params, req, runtime), new $_model.ActivateQwenEduApiResponse({}));
116
122
  }
117
123
  /**
118
- * 开通千问教育API权限
124
+ * Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
119
125
  *
120
126
  * @remarks
121
- * 开通千问教育API权限
127
+ * ## Request description
128
+ * - This operation activates the Qwen learning AI suite capability for the current Alibaba Cloud account.
129
+ * - You must call this operation first. You can call business API operations such as problem solving and grading only after `ACTIVE` is returned.
130
+ * ### Precautions
131
+ * - Both Alibaba Cloud accounts and RAM users can call this operation.
132
+ * - When a RAM user calls this operation, ensure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
133
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
122
134
  *
123
135
  * @param request - ActivateQwenEduApiRequest
124
136
  * @returns ActivateQwenEduApiResponse
@@ -129,17 +141,16 @@ class Client extends openapi_core_1.default {
129
141
  return await this.activateQwenEduApiWithOptions(request, headers, runtime);
130
142
  }
131
143
  /**
132
- * 提交单页作业图片,返回任务ID及初步检测结果。
144
+ * Submits a single-page homework image and asynchronously retrieves the grading results.
133
145
  *
134
146
  * @remarks
135
- * ## 请求说明
136
- * - 该接口用于提交单页作业图片进行批改,支持通过图片URL或Base64编码的图片数据。
137
- * - 提交后会立即返回任务ID、矫正图及题目检测结果,但不包含具体的批改结论。
138
- * - 需要通过查询接口轮询获取最终的批改结果。
139
- * - 支持对图片进行透视矫正,默认开启。
140
- * - 图片要求:支持多种格式(JPEG, PNG, GIF等),推荐体积不超过1MB,最大支持15MB(Base64编码后)。
141
- * - 每次请求仅处理一张图片,多张图片需分别提交。
142
- * - `request_id`字段建议由调用方生成并传递,以便于问题排查和对账。
147
+ * ## Request description
148
+ * - This operation is used to submit a homework image to the server for question segmentation, recognition, and grading.
149
+ * - You can submit the image by using `imageBase64` or `imageUrl`. `imageBase64` is preferred.
150
+ * - The optional parameter `dewarp` specifies whether to correct the image distortion. Default value: `true`.
151
+ * - Provide `requestId` to facilitate troubleshooting and reconciliation.
152
+ * - Image size limit: The Base64-encoded image cannot exceed 15 MB.
153
+ * - All requests and responses are in JSON format.
143
154
  *
144
155
  * @param request - CreateEduHomeworkCorrectSubmitRequest
145
156
  * @param headers - map
@@ -173,23 +184,22 @@ class Client extends openapi_core_1.default {
173
184
  method: "POST",
174
185
  authType: "AK",
175
186
  style: "ROA",
176
- reqBodyType: "formData",
187
+ reqBodyType: "json",
177
188
  bodyType: "json",
178
189
  });
179
190
  return $dara.cast(await this.callApi(params, req, runtime), new $_model.CreateEduHomeworkCorrectSubmitResponse({}));
180
191
  }
181
192
  /**
182
- * 提交单页作业图片,返回任务ID及初步检测结果。
193
+ * Submits a single-page homework image and asynchronously retrieves the grading results.
183
194
  *
184
195
  * @remarks
185
- * ## 请求说明
186
- * - 该接口用于提交单页作业图片进行批改,支持通过图片URL或Base64编码的图片数据。
187
- * - 提交后会立即返回任务ID、矫正图及题目检测结果,但不包含具体的批改结论。
188
- * - 需要通过查询接口轮询获取最终的批改结果。
189
- * - 支持对图片进行透视矫正,默认开启。
190
- * - 图片要求:支持多种格式(JPEG, PNG, GIF等),推荐体积不超过1MB,最大支持15MB(Base64编码后)。
191
- * - 每次请求仅处理一张图片,多张图片需分别提交。
192
- * - `request_id`字段建议由调用方生成并传递,以便于问题排查和对账。
196
+ * ## Request description
197
+ * - This operation is used to submit a homework image to the server for question segmentation, recognition, and grading.
198
+ * - You can submit the image by using `imageBase64` or `imageUrl`. `imageBase64` is preferred.
199
+ * - The optional parameter `dewarp` specifies whether to correct the image distortion. Default value: `true`.
200
+ * - Provide `requestId` to facilitate troubleshooting and reconciliation.
201
+ * - Image size limit: The Base64-encoded image cannot exceed 15 MB.
202
+ * - All requests and responses are in JSON format.
193
203
  *
194
204
  * @param request - CreateEduHomeworkCorrectSubmitRequest
195
205
  * @returns CreateEduHomeworkCorrectSubmitResponse
@@ -200,36 +210,34 @@ class Client extends openapi_core_1.default {
200
210
  return await this.createEduHomeworkCorrectSubmitWithOptions(request, headers, runtime);
201
211
  }
202
212
  /**
203
- * 通过图片URL或Base64编码接收题目,返回解题过程和结果。
213
+ * Provides question resolution services by using image URLs or Base64 encoding.
204
214
  *
205
215
  * @remarks
206
- * ## 请求说明
207
- * - 本接口支持通过单张题目图片的URL或Base64编码进行解题请求。
208
- * - 支持处理JPEG、JPG、PNG格式的图片,且图片大小不超过10MB,像素总数不超过260万。
209
- * - 请求必须携带`request_id`字段,用于链路关联和对账;建议使用UUID以保证唯一性。
210
- * - `Authorization`头部需包含有效的`appKey`,采用`Bearer <appKey>`格式。
211
- * - 接口响应为SSE流式数据,客户端应逐事件读取并解析,不得等待连接关闭后整体读取。
212
- * - 成功响应包括`message`(过程态全量解题快照)和`complete`(最终完整结果)两种事件类型。
213
- * - 错误处理分为建流前与建流后两个阶段,根据错误码及`retryable`字段决定是否重试。
214
- * - 客户端超时设置建议不低于3分钟,并确保代理层不会缓存SSE响应或提前关闭长连接。
216
+ * ## Request instructions
217
+ * - This API retrieves question resolution results by using the URL or Base64 encoding of a question image.
218
+ * - Only a single image is supported per request, and the image format must be JPG, JPEG, or PNG.
219
+ * - The image must be clear and complete. Avoid tilted, obscured, or irrelevant content.
220
+ * - Each request can process only one image. Multi-image or plain text requests are not supported.
221
+ * - The recommended image size is up to 1 MB, with a maximum limit of 10 MB. The width and height of the image must not exceed 8,000 pixels, and the total number of pixels must not exceed 2.6 million.
222
+ * - Use the HTTPS protocol to call the API and provide image URLs.
223
+ * - The user_id must be an anonymized identifier. Do not pass direct identity information such as names or phone numbers.
224
+ * - This API uses the HTTP POST method combined with Server-Sent Events (SSE) streaming response technology. The client must read the response event by event and must not wait for the connection to close before reading the entire response.
225
+ * - A successful response returns the question resolution process step by step through a series of message events and ends with a complete event. If an error occurs, an error event is returned.
226
+ * - For retryable errors such as TOO_MANY_ACTIVE_STREAMS, use an exponential backoff strategy to retry the request.
227
+ * - Set a reasonable timeout period for the client, which must be at least 3 minutes, and ensure that the proxy layer does not cache SSE responses.
215
228
  *
216
- * @param tmpReq - CreateEduProblemSolveRequest
229
+ * @param request - CreateEduProblemSolveRequest
217
230
  * @param headers - map
218
231
  * @param runtime - runtime options for this request RuntimeOptions
219
232
  * @returns CreateEduProblemSolveResponse
220
233
  */
221
- createEduProblemSolveWithSSE(tmpReq, headers, runtime) {
234
+ createEduProblemSolveWithSSE(request, headers, runtime) {
222
235
  return __asyncGenerator(this, arguments, function* createEduProblemSolveWithSSE_1() {
223
236
  var _a, e_1, _b, _c;
224
- tmpReq.validate();
225
- let request = new $_model.CreateEduProblemSolveShrinkRequest({});
226
- openapi_core_2.OpenApiUtil.convert(tmpReq, request);
227
- if (!$dara.isNull(tmpReq.query)) {
228
- request.queryShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.query, "query", "json");
229
- }
237
+ request.validate();
230
238
  let body = {};
231
- if (!$dara.isNull(request.queryShrink)) {
232
- body["query"] = request.queryShrink;
239
+ if (!$dara.isNull(request.query)) {
240
+ body["query"] = request.query;
233
241
  }
234
242
  if (!$dara.isNull(request.requestId)) {
235
243
  body["requestId"] = request.requestId;
@@ -246,7 +254,7 @@ class Client extends openapi_core_1.default {
246
254
  method: "POST",
247
255
  authType: "AK",
248
256
  style: "ROA",
249
- reqBodyType: "formData",
257
+ reqBodyType: "json",
250
258
  bodyType: "json",
251
259
  });
252
260
  let sseResp = yield __await(this.callSSEApi(params, req, runtime));
@@ -277,34 +285,32 @@ class Client extends openapi_core_1.default {
277
285
  });
278
286
  }
279
287
  /**
280
- * 通过图片URL或Base64编码接收题目,返回解题过程和结果。
288
+ * Provides question resolution services by using image URLs or Base64 encoding.
281
289
  *
282
290
  * @remarks
283
- * ## 请求说明
284
- * - 本接口支持通过单张题目图片的URL或Base64编码进行解题请求。
285
- * - 支持处理JPEG、JPG、PNG格式的图片,且图片大小不超过10MB,像素总数不超过260万。
286
- * - 请求必须携带`request_id`字段,用于链路关联和对账;建议使用UUID以保证唯一性。
287
- * - `Authorization`头部需包含有效的`appKey`,采用`Bearer <appKey>`格式。
288
- * - 接口响应为SSE流式数据,客户端应逐事件读取并解析,不得等待连接关闭后整体读取。
289
- * - 成功响应包括`message`(过程态全量解题快照)和`complete`(最终完整结果)两种事件类型。
290
- * - 错误处理分为建流前与建流后两个阶段,根据错误码及`retryable`字段决定是否重试。
291
- * - 客户端超时设置建议不低于3分钟,并确保代理层不会缓存SSE响应或提前关闭长连接。
291
+ * ## Request instructions
292
+ * - This API retrieves question resolution results by using the URL or Base64 encoding of a question image.
293
+ * - Only a single image is supported per request, and the image format must be JPG, JPEG, or PNG.
294
+ * - The image must be clear and complete. Avoid tilted, obscured, or irrelevant content.
295
+ * - Each request can process only one image. Multi-image or plain text requests are not supported.
296
+ * - The recommended image size is up to 1 MB, with a maximum limit of 10 MB. The width and height of the image must not exceed 8,000 pixels, and the total number of pixels must not exceed 2.6 million.
297
+ * - Use the HTTPS protocol to call the API and provide image URLs.
298
+ * - The user_id must be an anonymized identifier. Do not pass direct identity information such as names or phone numbers.
299
+ * - This API uses the HTTP POST method combined with Server-Sent Events (SSE) streaming response technology. The client must read the response event by event and must not wait for the connection to close before reading the entire response.
300
+ * - A successful response returns the question resolution process step by step through a series of message events and ends with a complete event. If an error occurs, an error event is returned.
301
+ * - For retryable errors such as TOO_MANY_ACTIVE_STREAMS, use an exponential backoff strategy to retry the request.
302
+ * - Set a reasonable timeout period for the client, which must be at least 3 minutes, and ensure that the proxy layer does not cache SSE responses.
292
303
  *
293
- * @param tmpReq - CreateEduProblemSolveRequest
304
+ * @param request - CreateEduProblemSolveRequest
294
305
  * @param headers - map
295
306
  * @param runtime - runtime options for this request RuntimeOptions
296
307
  * @returns CreateEduProblemSolveResponse
297
308
  */
298
- async createEduProblemSolveWithOptions(tmpReq, headers, runtime) {
299
- tmpReq.validate();
300
- let request = new $_model.CreateEduProblemSolveShrinkRequest({});
301
- openapi_core_2.OpenApiUtil.convert(tmpReq, request);
302
- if (!$dara.isNull(tmpReq.query)) {
303
- request.queryShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.query, "query", "json");
304
- }
309
+ async createEduProblemSolveWithOptions(request, headers, runtime) {
310
+ request.validate();
305
311
  let body = {};
306
- if (!$dara.isNull(request.queryShrink)) {
307
- body["query"] = request.queryShrink;
312
+ if (!$dara.isNull(request.query)) {
313
+ body["query"] = request.query;
308
314
  }
309
315
  if (!$dara.isNull(request.requestId)) {
310
316
  body["requestId"] = request.requestId;
@@ -321,24 +327,27 @@ class Client extends openapi_core_1.default {
321
327
  method: "POST",
322
328
  authType: "AK",
323
329
  style: "ROA",
324
- reqBodyType: "formData",
330
+ reqBodyType: "json",
325
331
  bodyType: "json",
326
332
  });
327
333
  return $dara.cast(await this.callApi(params, req, runtime), new $_model.CreateEduProblemSolveResponse({}));
328
334
  }
329
335
  /**
330
- * 通过图片URL或Base64编码接收题目,返回解题过程和结果。
336
+ * Provides question resolution services by using image URLs or Base64 encoding.
331
337
  *
332
338
  * @remarks
333
- * ## 请求说明
334
- * - 本接口支持通过单张题目图片的URL或Base64编码进行解题请求。
335
- * - 支持处理JPEG、JPG、PNG格式的图片,且图片大小不超过10MB,像素总数不超过260万。
336
- * - 请求必须携带`request_id`字段,用于链路关联和对账;建议使用UUID以保证唯一性。
337
- * - `Authorization`头部需包含有效的`appKey`,采用`Bearer <appKey>`格式。
338
- * - 接口响应为SSE流式数据,客户端应逐事件读取并解析,不得等待连接关闭后整体读取。
339
- * - 成功响应包括`message`(过程态全量解题快照)和`complete`(最终完整结果)两种事件类型。
340
- * - 错误处理分为建流前与建流后两个阶段,根据错误码及`retryable`字段决定是否重试。
341
- * - 客户端超时设置建议不低于3分钟,并确保代理层不会缓存SSE响应或提前关闭长连接。
339
+ * ## Request instructions
340
+ * - This API retrieves question resolution results by using the URL or Base64 encoding of a question image.
341
+ * - Only a single image is supported per request, and the image format must be JPG, JPEG, or PNG.
342
+ * - The image must be clear and complete. Avoid tilted, obscured, or irrelevant content.
343
+ * - Each request can process only one image. Multi-image or plain text requests are not supported.
344
+ * - The recommended image size is up to 1 MB, with a maximum limit of 10 MB. The width and height of the image must not exceed 8,000 pixels, and the total number of pixels must not exceed 2.6 million.
345
+ * - Use the HTTPS protocol to call the API and provide image URLs.
346
+ * - The user_id must be an anonymized identifier. Do not pass direct identity information such as names or phone numbers.
347
+ * - This API uses the HTTP POST method combined with Server-Sent Events (SSE) streaming response technology. The client must read the response event by event and must not wait for the connection to close before reading the entire response.
348
+ * - A successful response returns the question resolution process step by step through a series of message events and ends with a complete event. If an error occurs, an error event is returned.
349
+ * - For retryable errors such as TOO_MANY_ACTIVE_STREAMS, use an exponential backoff strategy to retry the request.
350
+ * - Set a reasonable timeout period for the client, which must be at least 3 minutes, and ensure that the proxy layer does not cache SSE responses.
342
351
  *
343
352
  * @param request - CreateEduProblemSolveRequest
344
353
  * @returns CreateEduProblemSolveResponse
@@ -349,7 +358,15 @@ class Client extends openapi_core_1.default {
349
358
  return await this.createEduProblemSolveWithOptions(request, headers, runtime);
350
359
  }
351
360
  /**
352
- * 查询批改进度、增量结果、终态结果及 Token 用量
361
+ * Queries the progress and final results of homework grading based on the task ID.
362
+ *
363
+ * @remarks
364
+ * ## Request description
365
+ * - This operation queries the status and detailed results of single-page homework grading by using the `taskId` returned when the task is submitted.
366
+ * - The caller should poll this operation at an interval of 1 to 2 seconds until the task status changes to `finished` or `failed`.
367
+ * - When the task status is `finished`, the response contains complete grading information, including question recognition, grading conclusions, dewarped images, and rendered images.
368
+ * - If the task fails (the status is `failed`), check the `message` field in the response or the specific fault information in `data`.
369
+ * - All requests and responses are in JSON format.
353
370
  *
354
371
  * @param request - GetEduHomeworkCorrectionResultRequest
355
372
  * @param headers - map
@@ -380,7 +397,15 @@ class Client extends openapi_core_1.default {
380
397
  return $dara.cast(await this.callApi(params, req, runtime), new $_model.GetEduHomeworkCorrectionResultResponse({}));
381
398
  }
382
399
  /**
383
- * 查询批改进度、增量结果、终态结果及 Token 用量
400
+ * Queries the progress and final results of homework grading based on the task ID.
401
+ *
402
+ * @remarks
403
+ * ## Request description
404
+ * - This operation queries the status and detailed results of single-page homework grading by using the `taskId` returned when the task is submitted.
405
+ * - The caller should poll this operation at an interval of 1 to 2 seconds until the task status changes to `finished` or `failed`.
406
+ * - When the task status is `finished`, the response contains complete grading information, including question recognition, grading conclusions, dewarped images, and rendered images.
407
+ * - If the task fails (the status is `failed`), check the `message` field in the response or the specific fault information in `data`.
408
+ * - All requests and responses are in JSON format.
384
409
  *
385
410
  * @param request - GetEduHomeworkCorrectionResultRequest
386
411
  * @returns GetEduHomeworkCorrectionResultResponse
@@ -391,7 +416,17 @@ class Client extends openapi_core_1.default {
391
416
  return await this.getEduHomeworkCorrectionResultWithOptions(request, headers, runtime);
392
417
  }
393
418
  /**
394
- * 千问教育API开通状态查询
419
+ * Queries whether the current account has activated Qwen education-related services.
420
+ *
421
+ * @remarks
422
+ * ## Request description
423
+ * This operation queries whether a specified Alibaba Cloud account or RAM user has successfully activated the Qwen learning AI suite. Before calling any business API operations, you must use this operation to confirm that the service status is `ACTIVE`. If the service is not activated, perform the corresponding operations based on the returned status information, such as waiting for a period of time and retrying.
424
+ * ### Precautions
425
+ * - This operation supports calls from Alibaba Cloud accounts and RAM users.
426
+ * - When a RAM user calls this operation, make sure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
427
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
428
+ * - If the status is `ACTIVATING`, retry the query after the time interval recommended by the returned `retry_after_seconds` field.
429
+ * - If a failure occurs (`FAILED`), refer to the specific error code, take corresponding measures, and then try again.
395
430
  *
396
431
  * @param request - GetQwenEduApiActivationStatusRequest
397
432
  * @param headers - map
@@ -417,7 +452,17 @@ class Client extends openapi_core_1.default {
417
452
  return $dara.cast(await this.callApi(params, req, runtime), new $_model.GetQwenEduApiActivationStatusResponse({}));
418
453
  }
419
454
  /**
420
- * 千问教育API开通状态查询
455
+ * Queries whether the current account has activated Qwen education-related services.
456
+ *
457
+ * @remarks
458
+ * ## Request description
459
+ * This operation queries whether a specified Alibaba Cloud account or RAM user has successfully activated the Qwen learning AI suite. Before calling any business API operations, you must use this operation to confirm that the service status is `ACTIVE`. If the service is not activated, perform the corresponding operations based on the returned status information, such as waiting for a period of time and retrying.
460
+ * ### Precautions
461
+ * - This operation supports calls from Alibaba Cloud accounts and RAM users.
462
+ * - When a RAM user calls this operation, make sure that the RAM user has the required RAM permissions. The service is activated for the Alibaba Cloud account to which the RAM user belongs.
463
+ * - This operation is idempotent based on the Alibaba Cloud account ID. Repeated calls do not result in multiple activations.
464
+ * - If the status is `ACTIVATING`, retry the query after the time interval recommended by the returned `retry_after_seconds` field.
465
+ * - If a failure occurs (`FAILED`), refer to the specific error code, take corresponding measures, and then try again.
421
466
  *
422
467
  * @param request - GetQwenEduApiActivationStatusRequest
423
468
  * @returns GetQwenEduApiActivationStatusResponse