Connecting to a content repository on a custom service
Create the custom service instance to connect to a content repository. You can host the instance on either the server side or the client side, based on specific requirements. The agent connects to the content repository through the custom service instance.
This feature is not supported in the On-premises deployment.
Accessing the custom service repository
Follow the steps to connect to a custom service repository:
-
In the Knowledge section, go to Documents.
-
Select Content repository, and click Connect content repository > Custom service.
-
In URL, enter the endpoint URL of the custom service repository.
-
In Choose an authentication type, select one of three options:
- Basic authentication: If you select
Basic authentication
, you must provide a username and password. - API Key: If you select
API Key
, you must provide the custom service repository API key. - None: If you select
None
, click Next.
- Basic authentication: If you select
-
Click Next to configure the repository.
Configuring the custom service repository
Follow the steps to configure the Default filter and Metadata for your custom service connection:
-
In the Default filter field, enter a value to send as the default input to the custom service. The value can be plain text, JSON, or any other supported format.
-
In the Metadata section, enter optional metadata in JSON format.
-
Click Save.
Setting up retrieval systems for a custom service
To use a custom service with your search integration, you must integrate your search capability by providing a server to provide search results. You can use your own retrieval if the retrieval schema matches with the schema that is provided by your assistant. If your retrieval schema does not match with the assistant’s schema, you must provide a wrapper that does the schema mapping. You can deploy the wrapper as a service or your chat client can start it. Building a wrapper is useful when you want to combine a different source or invoking libraries or services that do not comply with the schema for assistant search results.
Setting up a server for custom service retrieval
A server for custom service retrieval must implement the following API:
Query: POST <server_url>
Request
{
"query": "<QUERY>",
"filter": "<FILTER>", // optional
"metadata": {
// optional, you can fill any information here
}
}
Response
{
"search_results": [
{
"result_metadata": { // optional
"score": <SCORE as a number>
},
"title": "<TITLE>",
"body": "<BODY>",
"url": "<URL>", // optional
"highlight": { // optional, will be used instead of "body" for Conversational Search if provided
"body": [
"<HIGHLIGHT1>",
"<HIGHLIGHT2>",
...
]
}
}
]
}
The metadata in the request and the entire response object must not exceed 100 KB.