After determining the analysis capability to use, call this API to initiate an asynchronous analysis task.
The Get available analysis capabilities API has been called to obtain details of the analysis capabilities available for the current query result. For more information, see Obtain Available Analysis Capabilities.
https://{domain}/dataAgent/llm/openApi/v2/agent/insightExecuteParameter | Type | Required | Example value | Description |
|---|---|---|---|---|
sessionId | int | Yes | 12886164 | Session ID. For example, when using the new version of the WenShu OpenAPI, configure the session ID returned in the sessionInfo of the create session result. For details, see Create a Session. |
historyId | int | Yes | 12886163 | Session result ID for this instance. For example, when decomposing a vague question into multiple sub-questions for WenShu, each sub-question result will have a session result ID. |
insightAbility | JSON | Yes | For details, see the request example below. | The intelligent analysis capability to be executed. You can configure it as the available analysis capability ("enable": true) returned by the Get available analysis capabilities API. |
The request body must include the sessionId and historyId obtained from previous steps, as well as the insightAbility object selected in Step 2 where enable is true.
{ "sessionId": "{步骤一返回的 sessionId}", "historyId": "{步骤一返回的 historyId}", "insightAbility": { "ability_code": "interpret", "ability_name": "解读", "enable": true, "cause": "", "ability_params": [ // ... This is the params object obtained in Step 2 corresponding to the selected ability_code. ] } }
Upon successful invocation, the API returns a JSON object containing the data field, whose value is the insightKey used to retrieve the final result.
Parameter | Type | Example value | Description |
|---|---|---|---|
data | string | INSIGHT_ANALYSIS_V2:XXXXXXXXXXXXXXXX | The |
{ "code": "llm/ok", "data": "INSIGHT_ANALYSIS_V2:XXXXXXXXXXXXXXXX", "msg": {} }