@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.
- package/dist/client.d.ts +117 -62
- package/dist/client.js +125 -80
- package/dist/client.js.map +1 -1
- package/dist/models/ActivateQwenEduApiResponseBody.d.ts +30 -0
- package/dist/models/ActivateQwenEduApiResponseBody.js.map +1 -1
- package/dist/models/CreateEduHomeworkCorrectSubmitRequest.d.ts +28 -0
- package/dist/models/CreateEduHomeworkCorrectSubmitRequest.js.map +1 -1
- package/dist/models/CreateEduHomeworkCorrectSubmitResponseBody.d.ts +143 -10
- package/dist/models/CreateEduHomeworkCorrectSubmitResponseBody.js.map +1 -1
- package/dist/models/CreateEduProblemSolveRequest.d.ts +26 -2
- package/dist/models/CreateEduProblemSolveRequest.js.map +1 -1
- package/dist/models/CreateEduProblemSolveResponseBody.d.ts +87 -23
- package/dist/models/CreateEduProblemSolveResponseBody.js +11 -35
- package/dist/models/CreateEduProblemSolveResponseBody.js.map +1 -1
- package/dist/models/GetEduHomeworkCorrectionResultRequest.d.ts +7 -0
- package/dist/models/GetEduHomeworkCorrectionResultRequest.js.map +1 -1
- package/dist/models/GetEduHomeworkCorrectionResultResponseBody.d.ts +194 -10
- package/dist/models/GetEduHomeworkCorrectionResultResponseBody.js.map +1 -1
- package/dist/models/GetQwenEduApiActivationStatusResponseBody.d.ts +37 -0
- package/dist/models/GetQwenEduApiActivationStatusResponseBody.js.map +1 -1
- package/dist/models/model.d.ts +3 -5
- package/dist/models/model.js +6 -10
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +125 -82
- package/src/models/ActivateQwenEduApiResponseBody.ts +30 -0
- package/src/models/CreateEduHomeworkCorrectSubmitRequest.ts +28 -0
- package/src/models/CreateEduHomeworkCorrectSubmitResponseBody.ts +143 -10
- package/src/models/CreateEduProblemSolveRequest.ts +26 -2
- package/src/models/CreateEduProblemSolveResponseBody.ts +92 -43
- package/src/models/GetEduHomeworkCorrectionResultRequest.ts +7 -0
- package/src/models/GetEduHomeworkCorrectionResultResponseBody.ts +194 -10
- package/src/models/GetQwenEduApiActivationStatusResponseBody.ts +37 -0
- package/src/models/model.ts +3 -5
- package/dist/models/CreateEduProblemSolveShrinkRequest.d.ts +0 -23
- package/dist/models/CreateEduProblemSolveShrinkRequest.js +0 -60
- package/dist/models/CreateEduProblemSolveShrinkRequest.js.map +0 -1
- 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
|
-
*
|
|
12
|
+
* Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
|
|
13
13
|
*
|
|
14
14
|
* @remarks
|
|
15
|
-
*
|
|
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
|
-
*
|
|
32
|
+
* Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
|
|
27
33
|
*
|
|
28
34
|
* @remarks
|
|
29
|
-
*
|
|
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
|
-
*
|
|
48
|
+
* Submits a single-page homework image and asynchronously retrieves the grading results.
|
|
37
49
|
*
|
|
38
50
|
* @remarks
|
|
39
|
-
* ##
|
|
40
|
-
* -
|
|
41
|
-
* -
|
|
42
|
-
* -
|
|
43
|
-
* -
|
|
44
|
-
* -
|
|
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
|
-
*
|
|
68
|
+
* Submits a single-page homework image and asynchronously retrieves the grading results.
|
|
58
69
|
*
|
|
59
70
|
* @remarks
|
|
60
|
-
* ##
|
|
61
|
-
* -
|
|
62
|
-
* -
|
|
63
|
-
* -
|
|
64
|
-
* -
|
|
65
|
-
* -
|
|
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
|
-
*
|
|
84
|
+
* Provides question resolution services by using image URLs or Base64 encoding.
|
|
75
85
|
*
|
|
76
86
|
* @remarks
|
|
77
|
-
* ##
|
|
78
|
-
* -
|
|
79
|
-
* -
|
|
80
|
-
* -
|
|
81
|
-
* -
|
|
82
|
-
* -
|
|
83
|
-
* -
|
|
84
|
-
* -
|
|
85
|
-
* -
|
|
86
|
-
*
|
|
87
|
-
*
|
|
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(
|
|
105
|
+
createEduProblemSolveWithSSE(request: $_model.CreateEduProblemSolveRequest, headers: {
|
|
93
106
|
[key: string]: string;
|
|
94
107
|
}, runtime: $dara.RuntimeOptions): AsyncGenerator<$_model.CreateEduProblemSolveResponse, any, unknown>;
|
|
95
108
|
/**
|
|
96
|
-
*
|
|
109
|
+
* Provides question resolution services by using image URLs or Base64 encoding.
|
|
97
110
|
*
|
|
98
111
|
* @remarks
|
|
99
|
-
* ##
|
|
100
|
-
* -
|
|
101
|
-
* -
|
|
102
|
-
* -
|
|
103
|
-
* -
|
|
104
|
-
* -
|
|
105
|
-
* -
|
|
106
|
-
* -
|
|
107
|
-
* -
|
|
108
|
-
*
|
|
109
|
-
*
|
|
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(
|
|
130
|
+
createEduProblemSolveWithOptions(request: $_model.CreateEduProblemSolveRequest, headers: {
|
|
115
131
|
[key: string]: string;
|
|
116
132
|
}, runtime: $dara.RuntimeOptions): Promise<$_model.CreateEduProblemSolveResponse>;
|
|
117
133
|
/**
|
|
118
|
-
*
|
|
134
|
+
* Provides question resolution services by using image URLs or Base64 encoding.
|
|
119
135
|
*
|
|
120
136
|
* @remarks
|
|
121
|
-
* ##
|
|
122
|
-
* -
|
|
123
|
-
* -
|
|
124
|
-
* -
|
|
125
|
-
* -
|
|
126
|
-
* -
|
|
127
|
-
* -
|
|
128
|
-
* -
|
|
129
|
-
* -
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
89
|
+
* Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
|
|
90
90
|
*
|
|
91
91
|
* @remarks
|
|
92
|
-
*
|
|
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
|
-
*
|
|
124
|
+
* Activates the learning capability for the current Alibaba Cloud account and supports querying the activation status.
|
|
119
125
|
*
|
|
120
126
|
* @remarks
|
|
121
|
-
*
|
|
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
|
-
*
|
|
144
|
+
* Submits a single-page homework image and asynchronously retrieves the grading results.
|
|
133
145
|
*
|
|
134
146
|
* @remarks
|
|
135
|
-
* ##
|
|
136
|
-
* -
|
|
137
|
-
* -
|
|
138
|
-
* -
|
|
139
|
-
* -
|
|
140
|
-
* -
|
|
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: "
|
|
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
|
-
*
|
|
193
|
+
* Submits a single-page homework image and asynchronously retrieves the grading results.
|
|
183
194
|
*
|
|
184
195
|
* @remarks
|
|
185
|
-
* ##
|
|
186
|
-
* -
|
|
187
|
-
* -
|
|
188
|
-
* -
|
|
189
|
-
* -
|
|
190
|
-
* -
|
|
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
|
-
*
|
|
213
|
+
* Provides question resolution services by using image URLs or Base64 encoding.
|
|
204
214
|
*
|
|
205
215
|
* @remarks
|
|
206
|
-
* ##
|
|
207
|
-
* -
|
|
208
|
-
* -
|
|
209
|
-
* -
|
|
210
|
-
* -
|
|
211
|
-
* -
|
|
212
|
-
* -
|
|
213
|
-
* -
|
|
214
|
-
* -
|
|
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
|
|
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(
|
|
234
|
+
createEduProblemSolveWithSSE(request, headers, runtime) {
|
|
222
235
|
return __asyncGenerator(this, arguments, function* createEduProblemSolveWithSSE_1() {
|
|
223
236
|
var _a, e_1, _b, _c;
|
|
224
|
-
|
|
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.
|
|
232
|
-
body["query"] = request.
|
|
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: "
|
|
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
|
-
*
|
|
288
|
+
* Provides question resolution services by using image URLs or Base64 encoding.
|
|
281
289
|
*
|
|
282
290
|
* @remarks
|
|
283
|
-
* ##
|
|
284
|
-
* -
|
|
285
|
-
* -
|
|
286
|
-
* -
|
|
287
|
-
* -
|
|
288
|
-
* -
|
|
289
|
-
* -
|
|
290
|
-
* -
|
|
291
|
-
* -
|
|
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
|
|
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(
|
|
299
|
-
|
|
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.
|
|
307
|
-
body["query"] = request.
|
|
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: "
|
|
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
|
-
*
|
|
336
|
+
* Provides question resolution services by using image URLs or Base64 encoding.
|
|
331
337
|
*
|
|
332
338
|
* @remarks
|
|
333
|
-
* ##
|
|
334
|
-
* -
|
|
335
|
-
* -
|
|
336
|
-
* -
|
|
337
|
-
* -
|
|
338
|
-
* -
|
|
339
|
-
* -
|
|
340
|
-
* -
|
|
341
|
-
* -
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|