Skip to main content

Call a plugin

This topic describes how to integrate plugins into multimodal interactions and call them from your client.

About plugins

The Multimodal Interaction Development Kit supports three types of plugins:
  1. Recommended plugins
    • Pre-installed, practical plugins are included with the Multimodal Interaction Kit.
    • They support common scenarios, such as weather queries, perpetual calendars, and stock price lookups.
    • They are ready to use out-of-the-box. No extra configuration is required.
    image.png
  2. Plugins from the Plug-in Marketplace
  3. Custom plugins
For more information about plugins from the Plug-in Marketplace and custom plugins, see Plugin overview.

Integration flow

  • Recommended plugins: They are enabled by default. You can clear the check box to disable them.
  • Plugins from the Plug-in Marketplace: Click the Add button to integrate them.
  • Custom plugins:
    1. Create a plugin: For more information, see Custom plugins. Note: You must complete both the Create Plug-in and Create Tool steps, and then publish the plugin. If you return to the Multimodal Interaction console and cannot select your newly created plugin in the Custom Plug-ins list, verify that you completed the Create Tool step and published the plugin.
    2. Attach the plugin: Click the Add button to attach your created plugin (such as Dormitory Agreement Query Tool).
      image.png

Call plugins from your client

  • Recommended plugins: They are integrated into the SDK. No manual call is needed.
  • Plugin Square plugins are the same as custom plugins.
  • Custom plugins: You can call them using the SDK. Set the variable values specified in the plugin configuration.
//Java & Android
HashMap<String, Object> pluginParams = new HashMap<>();
pluginParams.put("article_index",2);
HashMap<String, Object> userDefinedParams = new HashMap<>();
userDefinedParams.put("your_plugin_code",pluginParams);

MultiModalRequestParam.BizParams bizParams = MultiModalRequestParam.BizParams
   .builder()
   .userDefinedParams(userDefinedParams)
   .build();
plugin_parm = {"article_index": "2"}
user_defined_params = {"your_plugin_code": plugin_parm}
biz_params = BizParams(user_defined_params=user_defined_params)
var pluginParam = ["article_index" : 2]
var userDefinedParams = ["your_plugin_code" : pluginParam]

multiBuilder.bizParams = MultiModalRequestParam.BizParams(builder: {
  bizBuilder in
  bizBuilder.userDefinedParams = userDefinedParams
})

Plugin parameter description

Top-level parameter

Second-level parameter

Third-level parameter

Fourth-level parameter

Description

biz_params

The biz_params field in the multimodal request parameters

user_defined_params

Pass-through user-defined parameters

your_plugin_code

The ID of the imported Model Studio application. For more information, see Custom plugins to get the tool ID.

your_plugin_param

Type: Object

Corresponds to the information configured for the plugin

Example:
{
    "biz_params": {
        "user_defined_params": {
            "${your_plugin_code}": {
                "article_index": 2
            }
        }
    }
}
Agent Development
Agent Context
Agent Governance & Evolution
Store
Application Marketplace