Call a plugin and retrieve its response.
Operation description
Prerequisites
- You have activated Alibaba Cloud Model Studio and Tongyi Dianjin services.
- Obtain the workspaceId: Obtain the workspace identifier.
Debug
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Debug
Authorization information
The following table describes the authorization information for this API. You can use it in the Action element of a RAM policy statement to grant RAM users or RAM roles the permission to call this API. Details are as follows:
- Action: the specific permission point.
- Access level: the access level of each action. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization for the action. Details are as follows:
- For required resource types, an asterisk (*) is added as a prefix.
- For actions that do not support resource-level authorization,
All resourcesis used.
- Condition key: the condition keys defined by the cloud service itself.
- Related action: other permissions required to perform the action successfully. The caller must also have the permissions of the related actions for the action to succeed.
| Action | Access level | Resource type | Condition key | Related action |
|---|---|---|---|---|
| dianjin:InvokePlugin | none | *All resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| workspaceId | string | Yes | Path parameter. The workspace ID. | llm-xxxxx |
| body | object | No | Request body parameters. | |
| params | object | No | Request parameters | { "query": "Introduce the precious metals business", "filters": [ { "libraryId": "9xznrxw" } ], "topK": 1 } |
| pluginId | string | No | The plugin ID. | 3mj87da7zr |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | ResultCode | ||
| cost | long | The time consumed. | null |
| data | object | Response data. | {'jobWaiting': [0, 0], 'timestamps': [1713383820, 1713383880], 'jobUsage': [0, 0], 'quotaUsage': [123, 32]} |
| dataType | string | Data type. | null |
| errCode | string | Error code. | 0 |
| message | string | Error message. | ok |
| requestId | string | The request ID. | 915AAAB9-4908-5224-9E53-9E9D7D0AA94B |
| success | boolean | Indicates whether the request was successful. | true |
| time | string | The timestamp. | 2024-04-24 11:54:34 |
Examples
Success response
JSON format