All Products
Search
Document Center

OpenSearch:Integrate ecosystem platforms

Last Updated:May 14, 2024

This topic describes how to use the ecosystem integration feature of OpenSearch LLM-Based Conversational Search Edition. In this example, a DingTalk chatbot is configured in a DingTalk group to integrate the enterprise-specific conversational search feature into the DingTalk group.

(Optional) Grant permissions to a RAM user

If you use OpenSearch as a Resource Access Management (RAM) user, grant permissions to the RAM user based on your business requirements.

1. Attach the AliyunOpenSearchFullAccess system policy to grant the full permissions on OpenSearch.

AliyunOpenSearchFullAccess

image.png

2. Attach the AliyunOpenSearchReadOnlyAccess system policy to grant the read-only permissions on OpenSearch.

AliyunOpenSearchReadOnlyAccess

image.png

You can also grant the permissions on an instance. For more information, see Create and authorize RAM users.

3. Grant permissions on ecosystem integration.

Create the AliyunOpenSearchOsepRole role and authorize this role to access the API of your OpenSearch LLM-Based Conversational Search Edition instance to help you integrate with platforms such as DingTalk, Lark, and WeCom.

Go to the authorization page and click Agree to Authorization.

image.png

If you use OpenSearch in the Singapore region, go to the Cloud Resource Access Authorization page.

Purchase an instance

For more information, see Purchase an OpenSearch LLM-Based Conversational Search Edition instance.

Configure the instance

Import data

In this example, data is uploaded in the OpenSearch console. Go to the details page of your instance and choose Configuration Center > Data Configuration in the left-side pane. Click Import File. In the Import File panel, import data by uploading a file. You can import structured data from a TXT or JSON file, or import unstructured data from a DOC, DOCX, PDF, or HTML file. To view supported data formats, click Data Sample.

image.png

Other data import methods

For more information about how to import data from web pages, see Import data.

For more information about how to import data by using SDKs, see Demo code for pushing structured documents and Demo code for pushing unstructured documents.

For more information about how to import data by using API operations, see Q&A document push.

Configure ecosystem integration for a custom DingTalk chatbot

1. Log on to the OpenSearch LLM-Based Conversational Search Edition console. Go to the details page of your instance and click Ecosystem Connection in the left-side pane. On the Endpoint tab, click Create. In the Create Access Point panel, enter an endpoint name and select Custom DingTalk Chatbot from the Ecosystem Platform drop-down list.

image.png

image

2. Configure other parameters such as Authentication Type, Key, and Webhook URL. Then, click OK.

image.png

Note
  • Access Point Name: the name of the endpoint. The name must be 1 to 30 characters in length, and can contain letters, digits, and underscores (_). It must start with a letter and must be unique.

  • Key: the signature string generated for your custom DingTalk chatbot.

  • Webhook URL: the webhook URL of your custom DingTalk chatbot.

3. After the endpoint is created, you can find the endpoint and click Edit in the Actions column to modify the endpoint.

image.png

Configure a DingTalk chatbot

1. Open the dialog box of a DingTalk group. Click the Group Settings icon in the upper-right corner. In the Group Settings panel, click Bot. In the Robot Management panel, click Add Robot. In the Robot dialog box, click Custom and then click Add.

image.png

image.png

2. Enter a chatbot name, check the name of the DingTalk group, select Additional Signature in the Security Settings section, and then copy the generated signature string. You can paste the signature string to the Key field of the Create Access Point panel.

image.png

Select Whether or not to open the Outgoing mechanism. Enter the request URL and token of the endpoint that you create in OpenSearch LLM-Based Conversational Search Edition.

Parameters of a custom DingTalk chatbot

image.png

Request URL and token of an endpoint in OpenSearch LLM-Based Conversational Search Edition

image.png

Note
  • If Whether or not to open the Outgoing mechanism is dimmed in your DingTalk group, use an internal DingTalk chatbot.

  • Make sure that the request URL and token of the endpoint that you enter are valid. If the entered information is invalid, the DingTalk chatbot is unavailable.

3. Copy the webhook URL of the DingTalk chatbot and paste it to the Webhook URL field of the Create Access Point panel. Then, click Finished.

image.png

4. In the dialog box of the DingTalk group, @DingTalk chatbot and enter questions.

image.png

Usage notes

  • Make sure that the key and webhook URL that you enter when you create an endpoint in OpenSearch LLM-Based Conversational Search Edition are the same as the signature string and webhook URL generated for your custom DingTalk chatbot.

  • Make sure that the request URL and token of the endpoint that you enter when you configure a custom DingTalk chatbot are the same as those of the endpoint that you create in OpenSearch LLM-Based Conversational Search Edition.