mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 20:43:27 -05:00
The manifest said its text in English only. An add-on can now translate what the host shows to people, and the library list shows it before the add-on is installed. The title and the description use the language maps of ui.title and ui.description, which every host already reads. A new optional field, i18n, translates the connector kinds by language tag. It stays under api 2 and its set of fields is closed: the title and the description of a declared kind, and only where the English kind has them. Tool descriptions, schemas and skills are for the model and stay English. Tags follow the language map rule (at most 16, no English), each string has the limit of its English field, all translated text has at most 12 000 characters, and markup, control characters and direction overrides are refused. A host that does not know the field refuses the manifest, as it refuses any unknown field. The field is part of the manifest, so the package digest and the signature cover it. The catalog generator copies the translated title and description of the manifest into each library entry (ui.titles, ui.descriptions), the host validates them like the manifest values, and a library search matches the English and the translated text. The apps list and the connector kinds return the text of every language and, when the request names a language (lang, else Accept-Language), the resolved text beside the English fields: language, localizedTitle and localizedDescription. No existing field changes. Every add-on on master now has its title and description in Italian, German, Spanish, French, Brazilian Portuguese, Simplified Chinese, Korean and Indonesian, and the chat connectors carry their kind text in the same languages. The packaging tests require that, and that a translation has the fields of the English text it translates. The names of the add-ons that provide a role are matched in their English title only: a translation is often an ordinary word of its language. Assisted-by: Claude:claude-sonnet-5-5 go
264 lines
7.7 KiB
JSON
264 lines
7.7 KiB
JSON
{
|
|
"api": {
|
|
"max": 2,
|
|
"min": 2
|
|
},
|
|
"arch": "amd64",
|
|
"capabilities": {
|
|
"hostOperations": {
|
|
"optional": [
|
|
"workspace.admin"
|
|
]
|
|
},
|
|
"toolDefinitions": [
|
|
{
|
|
"name": "search",
|
|
"description": "Search the web. Returns up to 10 results with title, URL and snippet. Use web_fetch to read a result.",
|
|
"kind": "read",
|
|
"inputSchema": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"freshness": {
|
|
"description": "Only results from this recent period.",
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month",
|
|
"year"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"maxResults": {
|
|
"description": "How many results (default 5).",
|
|
"maximum": 10,
|
|
"minimum": 1,
|
|
"type": "integer"
|
|
},
|
|
"query": {
|
|
"description": "What to search for.",
|
|
"maxLength": 400,
|
|
"type": "string"
|
|
},
|
|
"site": {
|
|
"description": "Only results from this host, for example docs.python.org.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"shadows": "web_search"
|
|
},
|
|
{
|
|
"name": "fetch",
|
|
"description": "Read a public web page or file by URL (http or https), PDF included. Returns its main text as Markdown. Long pages are cut; the end says how much is left.",
|
|
"kind": "read",
|
|
"inputSchema": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"format": {
|
|
"description": "markdown (default) keeps headings, links and tables; text is plain.",
|
|
"enum": [
|
|
"markdown",
|
|
"text"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"maxChars": {
|
|
"description": "Most characters to return (default 20000).",
|
|
"maximum": 100000,
|
|
"minimum": 100,
|
|
"type": "integer"
|
|
},
|
|
"url": {
|
|
"description": "The http or https address to read.",
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"url"
|
|
],
|
|
"type": "object"
|
|
},
|
|
"shadows": "web_fetch"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"description": "Say which search providers serve now. An administrator also gets the settings, without the keys. The Settings page calls it; no model does.",
|
|
"kind": "read",
|
|
"inputSchema": {
|
|
"additionalProperties": false,
|
|
"properties": {},
|
|
"type": "object"
|
|
},
|
|
"uiOnly": true
|
|
},
|
|
{
|
|
"name": "set-settings",
|
|
"description": "Save the search providers, their order and their keys. Administrators only. The Settings page calls it; no model does.",
|
|
"kind": "read",
|
|
"inputSchema": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"clear": {
|
|
"description": "Remove the saved key of these providers.",
|
|
"items": {
|
|
"enum": [
|
|
"brave",
|
|
"tavily",
|
|
"google",
|
|
"keenable"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"maxItems": 4,
|
|
"type": "array"
|
|
},
|
|
"googleEngine": {
|
|
"description": "The Programmable Search Engine ID (cx).",
|
|
"maxLength": 128,
|
|
"type": "string"
|
|
},
|
|
"keys": {
|
|
"additionalProperties": false,
|
|
"description": "A new key for each named provider. An empty value keeps the saved key.",
|
|
"properties": {
|
|
"brave": {
|
|
"maxLength": 256,
|
|
"type": "string"
|
|
},
|
|
"google": {
|
|
"maxLength": 256,
|
|
"type": "string"
|
|
},
|
|
"keenable": {
|
|
"maxLength": 256,
|
|
"type": "string"
|
|
},
|
|
"tavily": {
|
|
"maxLength": 256,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"order": {
|
|
"description": "The providers to try, first to last.",
|
|
"items": {
|
|
"enum": [
|
|
"brave",
|
|
"tavily",
|
|
"google",
|
|
"keenable",
|
|
"searxng",
|
|
"duckduckgo"
|
|
],
|
|
"type": "string"
|
|
},
|
|
"maxItems": 6,
|
|
"type": "array"
|
|
},
|
|
"searxngUrl": {
|
|
"description": "The address of a SearXNG instance.",
|
|
"maxLength": 2048,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"uiOnly": true
|
|
},
|
|
{
|
|
"name": "test-search",
|
|
"description": "Run one search with each provider of the order and say which answer. Administrators only. The Settings page calls it; no model does.",
|
|
"kind": "read",
|
|
"inputSchema": {
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"query": {
|
|
"description": "What to search for. Default LocalAI.",
|
|
"maxLength": 400,
|
|
"type": "string"
|
|
}
|
|
},
|
|
"type": "object"
|
|
},
|
|
"uiOnly": true
|
|
}
|
|
],
|
|
"tools": [
|
|
"search",
|
|
"fetch",
|
|
"status",
|
|
"set-settings",
|
|
"test-search"
|
|
],
|
|
"ui": {
|
|
"controls": [
|
|
"tool-providers"
|
|
],
|
|
"css": [
|
|
"ui/web.css"
|
|
],
|
|
"description": {
|
|
"en": "Search the web from your chats with Brave Search, Tavily or Google, and read PDF files on the web.",
|
|
"it": "Cerca sul web dalle tue chat con Brave Search, Tavily o Google, e leggi i file PDF sul web.",
|
|
"de": "Durchsuchen Sie das Web aus Ihren Chats mit Brave Search, Tavily oder Google und lesen Sie PDF-Dateien im Web.",
|
|
"es": "Busca en la web desde tus chats con Brave Search, Tavily o Google, y lee archivos PDF de la web.",
|
|
"fr": "Cherchez sur le web depuis vos conversations avec Brave Search, Tavily ou Google, et lisez des fichiers PDF sur le web.",
|
|
"pt-BR": "Pesquise na web a partir dos seus chats com Brave Search, Tavily ou Google, e leia arquivos PDF na web.",
|
|
"zh-CN": "在聊天中用 Brave Search、Tavily 或 Google 搜索网页,并读取网络上的 PDF 文件。",
|
|
"ko": "채팅에서 Brave Search, Tavily 또는 Google로 웹을 검색하고 웹의 PDF 파일을 읽습니다.",
|
|
"id": "Cari di web dari obrolan Anda dengan Brave Search, Tavily, atau Google, dan baca berkas PDF di web."
|
|
},
|
|
"entry": "ui/web.js",
|
|
"icon": "ui/icon.png",
|
|
"mainPage": "web",
|
|
"pages": [
|
|
"web"
|
|
],
|
|
"sdk": {
|
|
"max": 2,
|
|
"min": 2
|
|
},
|
|
"slots": [
|
|
{
|
|
"component": "WebSettings",
|
|
"id": "settings",
|
|
"slot": "settings.sections"
|
|
}
|
|
],
|
|
"title": {
|
|
"en": "Web",
|
|
"it": "Web",
|
|
"de": "Web",
|
|
"es": "Web",
|
|
"fr": "Web",
|
|
"pt-BR": "Web",
|
|
"zh-CN": "网页",
|
|
"ko": "웹",
|
|
"id": "Web"
|
|
}
|
|
}
|
|
},
|
|
"dataFormat": {
|
|
"max": 1,
|
|
"min": 1
|
|
},
|
|
"executable": "web",
|
|
"host": {
|
|
"max": 1,
|
|
"min": 1
|
|
},
|
|
"id": "web",
|
|
"os": "linux",
|
|
"protocol": {
|
|
"max": 1,
|
|
"min": 1
|
|
},
|
|
"schemaVersion": 1,
|
|
"version": "0.1.0"
|
|
}
|