Skip to content

in-Official plug-ins

Models may need additional capabilities for specific tasks such as real-time web searches and image processing. Model Studio provides official plugins. Select plugins to extend your model's capabilities.

First-time access

Your Alibaba Cloud account or RAM user (sub-account) needs the AliyunServiceRoleForSFMAccessCloudAPI service-linked role to access plugins. Follow these instructions to grant the permission.

Alibaba Cloud account

If you log in to Model Studio with an Alibaba Cloud account, go to the Plug-ins page, agree to the terms, and click Authorize and Enter.

RAM user (sub-account)

If you log in to Model Studio with a RAM user (sub-account), a prompt appears after you go to the Plug-ins page, agree to the terms, and click Authorize and Enter:

This prompt indicates the RAM user (sub-account) lacks permission to create a service-linked role. Follow these steps to grant the permission. The RAM user can then access the Plug-in page.

  1. Grant the RAM user (sub-account) permission to create a service-linked role.

    1. Log in to the RAM console with your Alibaba Cloud account.

    2. In the left-side navigation pane, choose Permissions > Policy.

    3. Click Create Policy.

    4. On the Script Editor tab, enter the following content in the Effect, Action, Resource, and Condition fields.

      HELPCODEESCAPE-plaintext
      {
          "Action": [
              "ram:CreateServiceLinkedRole"
          ],
          "Resource": "*",
          "Effect": "Allow",
          "Condition": {
              "StringEquals": {
                  "ram:ServiceName": "cloundapi-access.sfm.aliyuncs.com"
              }
          }
      }
    5. Click OK.

    6. Set a name for the policy and click OK.

    7. In the left-side navigation pane, choose .

    8. Find the desired RAM user (sub-account) and click Add Permission in the Actions column.

    9. Select the policy you just created and click OK.

      The RAM user (sub-account) now has the permission to create a service-linked role.

  2. Return to the Plug-ins page, agree to the terms, and click Authorize and Enter.

Official plugins

The Component Market offers pre-built official plugins. Call them directly without configuration.

Plugin nameTool IDDescriptionBilling
Python Code Interpretercode_interpreterEnables the model to execute Python code for tasks such as mathematical calculations, data analysis and visualization, and data processing.Free
CalculatorcalculatorEnables the model to perform complex mathematical calculations, such as "12313*13232".Free
Image Generationtext_to_imageEnables the model to generate images from text, such as "Draw a smiling dog."Free for a limited time, activation required.

Python Code Interpreter Sample input Output without plugin Output with plugin

python
import matplotlib.pyplot as plt
import numpy as np

x = np.linspace(-2, 2, 100)
y1 = np.sqrt(1 + x**2)
y2 = -np.sqrt(1 + x**2)

plt.plot(x, y1, label='y = sqrt(1 + x\^2)')
plt.plot(x, y2, label='y = -sqrt(1 + x\^2)')
plt.xlabel('x')
plt.ylabel('y')
plt.title('Hyperbola')
plt.legend()
plt.show()

The model application cannot execute Python code and only provides a textual description of the code. The model application can execute Python code to perform data visualization and analysis. The Python Code Interpreter plugin does not support accessing external networks or uploading local files. The available dependencies are: json5~=0.9.6, jupyter_client~=8.1.0, ipykernel~=6.25.0, seaborn, sympy, pydantic~=1.10.8, pillow~=9.4.0, fastapi~=0.101.1, dynaconf~=3.2.1, oss2~=2.18.1, matplotlib, starlette~=0.27.0, uvicorn~=0.23.2, requests~=2.31.0, scipy, html2text, matplotlib, pandas, pdf2image, pdfminer-six, pillow, pypdf, python-pptx, seaborn, sympy, and wordcloud. Calculator

Sample inputOutput without pluginOutput with plugin
12313*13232The model application cannot accurately solve complex mathematical problems and may produce incorrect results. The correct answer is 162,925,616.The model application can perform complex calculations and generate accurate results.

Image Generation

Sample inputOutput without pluginOutput with plugin
Please draw a smiling dog.The model application cannot generate images, describing the scene with text instead.The model application can generate an image of a dog based on the text prompt.

Using multiple plugins Model Studio lets you call multiple tools in a single task. You can select plugins that fit your needs.

Call official plugins

Step 1: Authorize the workspace (if required). Official plugins in a sub-workspace must be authorized before use. This authorization is not required for the default workspace.

  1. Go to the Plug-ins page, find the target plugin, and click View Details.

  2. Click Authorization , select the target sub-workspace, and click OK.

Step 2: Call the plugin.

Call a plugin

  • Method 1 : Add a tool to an agent application from the Plug-in page.

    An official plugin can only be associated with an Agent Application in the same workspace.

    1. Find the target plugin and click Add to Agent.

    2. Select a tool and click Next.

    3. Select an agent application and click Confirm Add.

    4. On the application details page, the tool is added automatically.

      You can also click Select Plug-in to add more tools. You can add up to 10 tools. The agent application will select and call one or more tools based on the input.

    5. Test the tool by interacting with the model in the input box.

    6. After testing, publish the application.

  • Method 2 : Go to the Apps page. Add the plugin to your agent or workflow application, test the plugin's functionality, and then Publish the application. For details, see Agent application plugin capabilities and Workflow application plugin nodes.

Get the tool ID

The tool ID identifies a specific tool. When you call a tool through an API, you must provide the correct tool ID.

  1. On the Plug-in page, find the target plugin and click View Details.

  2. Under Plug-in Tool, you can find the tool ID.

Besides official plugins, Model Studio supports custom plugins. See Custom plugins.

Mirror of Alibaba Cloud Model Studio docs for reference and RAG. Not affiliated with Alibaba Cloud.