Web search
This page covers the websearch_* options, which connect CKEditor AI On-Premises to a web search endpoint you run. You need it only if you enable web search for conversations or Document Processing.
CKEditor AI On-Premises does not include a web search tool. You provide the tool, run it, and connect it through the endpoint below.
To connect your web search endpoint, set these options:
websearch_enabled– must be set totrue.websearch_endpoint– the URL of your gateway. The service sends the search requests to this URL.websearch_request_timeout– request timeout in milliseconds (optional, default:30000).websearch_headers– headers the service sends with every web search request (optional). In the configuration file, the value is a JSON object or akey1:value1,key2:value2string. As an environment variable, the value must be the string form.
{
"websearch_enabled": true,
"websearch_endpoint": "[WEBSEARCH_ENDPOINT]",
"websearch_request_timeout": 30000,
"websearch_headers": {
"Authorization": "Bearer [WEBSEARCH_TOKEN]"
}
}Copy codeYour endpoint must accept POST requests with this JSON body:
{
"query": "search query string"
}Copy codeWhere:
query(required) – the search query string.
Your endpoint must return this response:
{
"results": [
{
"url": "https://example.com/article",
"text": "A snippet or excerpt of the content",
"title": "Article Title",
"author": "Author Name",
"publishedAt": "2024-12-12T10:30:00Z",
"favicon": "https://example.com/favicon.ico"
}
]
}Copy codeWhere:
results(required) – an array of web search results.
Each result object contains:
url(required) – the URL of the search result.text(required) – a snippet or excerpt of the content.title(optional) – the title of the search result.author(optional) – the author of the content.publishedAt(optional) – the publication date and time of the content in ISO 8601 format.favicon(optional) – the URL of the favicon for the website.
- Web resources – Connect the endpoint that fetches the pages users and models reference.
- Network requirements – Check the outbound destinations a deployment needs.
- Required configuration – Set the secret keys and the database, Redis, and storage options.