Skip to main content

AnswerSSE

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 resources is 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.
OperationAccess levelResource typeCondition keyDependent operation
edututor:AnswerSSEnone
*All resources
*
    None
None

Request syntax

POST /service/answerSSE HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
workspaceIdstringYes

The ID of the Model Studio workspace used for the current request.

llm-1ijrzuv3v0ivvls7
bodyobjectNo

The request body.

messagesarray<object>No

The content of the multi-turn conversation.

objectNo
rolestringYes

The role in the current conversation.

user
contentarray<object>No

The content of the current conversation.

objectNo

The conversation content, which can be text or an image.

stringNo

The text or image URL.

{"image": "image-url"} {"text": "Answer this question"}
parametersobjectNo

The parameter settings.

gradeintegerNo

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
stagestringNo

The educational stage.

other
subjectstringNo

The subject name.

other

Response parameters

NameTypeDescriptionExample
object

Schema of Response

requestIdstring

The request ID, which is unique for each request and useful for troubleshooting.

CED92479-FFA7-5B8F-AE6F-C8693BB4941C
successboolean

Indicates whether the call is successful.

True
codestring

The response status code.

SUCCESS
httpStatusCodeinteger

The HTTP status code.

200
messagestring

The description of the response code.

success
datastring

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_reasonstring

The streaming output flag, which indicates whether the streaming output is complete. The value stop is returned when the output ends.

stop
input_tokensinteger

The number of input tokens consumed by this call.

654
output_tokensinteger

The number of output tokens consumed by this call.

457

Algorithm result field data

  • This field must be deserialized. The fields are described below:
NameTypeDescriptionExample value
messagearray
message[0].contentarray
message[0].content[0].textstringThe solution generated by the large model."### Key Concepts Analysis:\n The core concepts tested in this problem include simplifying algebraic..."
message[0].rolestringThe role."assistant"
Example:
{
  "message": {
      "content": [
          {
              "text": "### 【考点分析】:\\n 本题涉及的核心知识点包括代数表达式的简化和代值计算。题目给出了 \\\\(a + b = -1\\\\) 和 \\\\(ab = 4\\\\) 两个条件,要求我们求解表达式 \\\\((4a - 5b - 3ab) - (3a - 6b + ab)\\\\) 的值。这类题目常见于代数基础部分,考查学生对代数式的基本运算和代入法的掌握。\\n\\n### 【方法点拨】:\\n1. **简化表达式**:首先对给定的表达式进行简化,合并同类项。\\n2. **代入已知条件**:将 \\\\(a + b = -1\\\\) 和 \\\\(ab = 4\\\\) 代入简化后的表达式中,进行计算。\\n3. **逐步求解**:通过逐步代入和计算,得到最终结果。\\n\\n### 【详细解析】:\\n\\n#### 第一步:简化表达式\\n 表达式为 \\\\((4a - 5b - 3ab) - (3a - 6b + ab)\\\\)。\\n\\n 先去掉括号并合并同类项:\\n\\\\[\\n(4a - 5b - 3ab) - (3a - 6b + ab) = 4a - 5b - 3ab - 3a + 6b - ab\\n\\\\]\\n\\n 合并同类项:\\n\\\\[\\n= (4a - 3a) + (-5b + 6b) + (-3ab - ab) = a + b - 4ab\\n\\\\]\\n\\n#### 第二步:代入已知条件\\n 根据题目条件 \\\\(a + b = -1\\\\) 和 \\\\(ab = 4\\\\),将这些值代入简化后的表达式:\\n\\\\[\\na + b - 4ab = -1 - 4 \\\\times 4 = -1 - 16 = -17\\n\\\\]\\n\\n#### 第三步:得出最终结果\\n 因此,表达式的值为 \\\\(-17\\\\)。\\n\\n### 【最终答案】:\\n\\\\(\\\\boxed{-17}\\\\) \\n\\n 所以,该表达式的值为 \\\\(\\\\boxed{-17}\\\\)。"
          }
      ],
      "role": "assistant"
  }
}

Examples

Success response JSON format
{
  "requestId": "CED92479-FFA7-5B8F-AE6F-C8693BB4941C",
  "success": true,
  "code": "SUCCESS",
  "httpStatusCode": 200,
  "message": "success",
  "data": "'{\"message\": {\"content\": [{\"text\": \"### 【考点分析】:\\\\n本题涉及的核心知识点包括代数表达式的简化和代值计算。题目给出了 \\\\\\\\(a + b = -1\\\\\\\\) 和 \\\\\\\\(ab = 4\\\\\\\\) 两个条件,要求我们求解表达式 \\\\\\\\((4a - 5b - 3ab) - (3a - 6b + ab)\\\\\\\\) 的值。这类题目常见于代数基础部分,考查学生对代数式的基本运算和代入法的掌握。\\\\n\\\\n### 【方法点拨】:\\\\n1. **简化表达式**:首先对给定的表达式进行简化,合并同类项。\\\\n2. **代入已知条件**:将 \\\\\\\\(a + b = -1\\\\\\\\) 和 \\\\\\\\(ab = 4\\\\\\\\) 代入简化后的表达式中,进行计算。\\\\n3. **逐步求解**:通过逐步代入和计算,得到最终结果。\\\\n\\\\n### 【详细解析】:\\\\n\\\\n#### 第一步:简化表达式\\\\n表达式为 \\\\\\\\((4a - 5b - 3ab) - (3a - 6b + ab)\\\\\\\\)。\\\\n\\\\n先去掉括号并合并同类项:\\\\n\\\\\\\\[\\\\n(4a - 5b - 3ab) - (3a - 6b + ab) = 4a - 5b - 3ab - 3a + 6b - ab\\\\n\\\\\\\\]\\\\n\\\\n合并同类项:\\\\n\\\\\\\\[\\\\n= (4a - 3a) + (-5b + 6b) + (-3ab - ab) = a + b - 4ab\\\\n\\\\\\\\]\\\\n\\\\n#### 第二步:代入已知条件\\\\n根据题目条件 \\\\\\\\(a + b = -1\\\\\\\\) 和 \\\\\\\\(ab = 4\\\\\\\\),将这些值代入简化后的表达式:\\\\n\\\\\\\\[\\\\na + b - 4ab = -1 - 4 \\\\\\\\times 4 = -1 - 16 = -17\\\\n\\\\\\\\]\\\\n\\\\n#### 第三步:得出最终结果\\\\n因此,表达式的值为 \\\\\\\\(-17\\\\\\\\)。\\\\n\\\\n### 【最终答案】:\\\\n\\\\\\\\(\\\\\\\\boxed{-17}\\\\\\\\) \\\\n\\\\n所以,该表达式的值为 \\\\\\\\(\\\\\\\\boxed{-17}\\\\\\\\)。\"}], \"role\": \"assistant\"}}'",
  "finish_reason": "stop",
  "input_tokens": 654,
  "output_tokens": 457
}

Error codes

Visit the Error Center to view more error codes.

Release notes

Change timeChange summaryOperation
No change history yet.