The streaming question answering API accepts text or an image of a question and returns a detailed solution.
Operation description
Activate the EduTutor service. This API is in the public beta stage, and each account can make 1,000 free calls per day.
Debugging
You can run this API directly in OpenAPI Explorer, which saves you the trouble of calculating signatures. After the operation succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Try it now
RAM authorization
The following table describes the authorization information of the API. You can use it in the Action element of RAM policy statements to grant RAM users or RAM roles the permission to call this API. For details:
- Operation: the specific permission point.
- Access level: the access level of each operation. Valid values: Write, Read, and List.
-
Resource type: the resource types that support authorization in the operation. For details:
- Required resource types are marked with a leading asterisk (*).
- For operations that do not support resource-level authorization,
All resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Dependent operation: other permissions required to successfully perform the operation. The caller must also have the permissions of the dependent operations for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent operation |
|---|---|---|---|---|
| edututor:AnswerSSE | none | *All resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | The ID of the Model Studio workspace used for the current request. | llm-1ijrzuv3v0ivvls7 |
| body | object | No | The request body. | |
| messages | array<object> | No | The content of the multi-turn conversation. | |
| object | No | |||
| role | string | Yes | The role in the current conversation. | user |
| content | array<object> | No | The content of the current conversation. | |
| object | No | The conversation content, which can be text or an image. | ||
| string | No | The text or image URL. | {"image": "image-url"} {"text": "Answer this question"} | |
| parameters | object | No | The parameter settings. | |
| grade | integer | No | The grade. Enter an integer. Valid values: 0: Preschool, 1: Grade 1, 2: Grade 2, 3: Grade 3, 4: Grade 4, 5: Grade 5, 6: Grade 6, 7: Grade 7 (first year of junior high school), 8: Grade 8 (second year of junior high school), 9: Grade 9 (third year of junior high school), 10: Grade 10 (first year of senior high school), 11: Grade 11 (second year of senior high school), 12: Grade 12 (third year of senior high school), 14: first year of university, 15: second year of university, 16: third year of university, 17: fourth year of university, 99: Other. | 6 |
| stage | string | No | The educational stage. | other |
| subject | string | No | The subject name. | other |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | The request ID, which is unique for each request and useful for troubleshooting. | CED92479-FFA7-5B8F-AE6F-C8693BB4941C |
| success | boolean | Indicates whether the call is successful. | True |
| code | string | The response status code. | SUCCESS |
| httpStatusCode | integer | The HTTP status code. | 200 |
| message | string | The description of the response code. | success |
| data | string | The response result. | '{"message": {"content": [{"text": "### Key Concepts Analysis:\\n The core concepts tested in this problem include simplifying algebraic expressions and substituting values. Given the conditions \\\\(a + b = -1\\\\) and \\\\(ab = 4\\\\), you are asked to find the value of the expression \\\\((4a - 5b - 3ab) - (3a - 6b + ab)\\\\). This type of problem is common in basic algebra and tests a student's mastery of fundamental algebraic operations and substitution methods.\\n\\n### Solution Strategy:\\n1. **Simplify the expression**: First, simplify the given expression by combining like terms.\\n2. **Substitute the known conditions**: Substitute \\\\(a + b = -1\\\\) and \\\\(ab = 4\\\\) into the simplified expression and calculate.\\n3. **Solve step-by-step**: Find the final result through gradual substitution and calculation.\\n\\n### Detailed Solution:\\n\\n#### Step 1: Simplify the expression\\n The expression is \\\\((4a - 5b - 3ab) - (3a - 6b + ab)\\\\).\\n\\n First, remove the parentheses and combine like terms:\\n\\\\[\\n(4a - 5b - 3ab) - (3a - 6b + ab) = 4a - 5b - 3ab - 3a + 6b - ab\\n\\\\]\\n\\n Combine like terms:\\n\\\\[\\n= (4a - 3a) + (-5b + 6b) + (-3ab - ab) = a + b - 4ab\\n\\\\]\\n\\n#### Step 2: Substitute the known conditions\\n Given \\\\(a + b = -1\\\\) and \\\\(ab = 4\\\\), substitute these values into the simplified expression:\\n\\\\[\\na + b - 4ab = -1 - 4 \\\\times 4 = -1 - 16 = -17\\n\\\\]\\n\\n#### Step 3: Get the final result\\n Therefore, the value of the expression is \\\\(-17\\\\).\\n\\n### Final Answer:\\n\\\\(\\\\boxed{-17}\\\\) \\n\\n So, the value of the expression is \\\\(\\\\boxed{-17}\\\\)."}], "role": "assistant"}}' |
| finish_reason | string | The streaming output flag, which indicates whether the streaming output is complete. The value stop is returned when the output ends. | stop |
| input_tokens | integer | The number of input tokens consumed by this call. | 654 |
| output_tokens | integer | The number of output tokens consumed by this call. | 457 |
Algorithm result field data
- This field must be deserialized. The fields are described below:
| Name | Type | Description | Example value |
|---|---|---|---|
| message | array | ||
| message[0].content | array | ||
| message[0].content[0].text | string | The solution generated by the large model. | "### Key Concepts Analysis:\n The core concepts tested in this problem include simplifying algebraic..." |
| message[0].role | string | The role. | "assistant" |
Examples
Success response
JSON format
Error codes
Visit the Error Center to view more error codes.
Release notes
| Change time | Change summary | Operation |
|---|