Диагностика AI


Диагностика AI

Диагностика AI

Статус

{
    "module": "AI",
    "enabled": false,
    "externalModelsEnabled": false,
    "writeToolsEnabled": false,
    "emergencySwitches": {
        "module": false,
        "externalModels": false,
        "localModels": true,
        "writeTools": false,
        "agents": true,
        "memory": true,
        "rag": true,
        "batch": true,
        "queueTools": true
    },
    "technicalUserLogin": "",
    "providers": [
        {
            "id": "cloud-openai-compatible",
            "title": "Cloud OpenAI-compatible endpoint",
            "type": "openai-compatible",
            "enabled": false,
            "endpoint": "",
            "external": true,
            "local": false,
            "offline": false,
            "costType": "paid",
            "costLevel": 5,
            "capabilities": {
                "text": true,
                "json": true,
                "tools": true,
                "embeddings": true,
                "images": true,
                "streaming": true
            },
            "models": []
        },
        {
            "id": "local-openai-compatible",
            "title": "Local OpenAI-compatible endpoint",
            "type": "openai-compatible",
            "enabled": false,
            "endpoint": "http://127.0.0.1:11434/v1",
            "external": false,
            "local": true,
            "offline": true,
            "costType": "internal",
            "costLevel": 0,
            "capabilities": {
                "text": true,
                "json": true,
                "tools": true,
                "embeddings": true,
                "images": false,
                "streaming": true
            },
            "models": []
        },
        {
            "id": "mock",
            "title": "Mock provider",
            "type": "mock",
            "enabled": true,
            "endpoint": "",
            "external": false,
            "local": true,
            "offline": true,
            "costType": "free",
            "costLevel": 0,
            "capabilities": {
                "text": true,
                "json": true,
                "tools": false,
                "embeddings": false,
                "images": false,
                "streaming": false
            },
            "models": [
                {
                    "providerId": "mock",
                    "id": "mock-text",
                    "enabled": true,
                    "title": "Mock text model",
                    "costType": "free",
                    "costLevel": 0,
                    "qualityLevel": 1,
                    "maxContext": 8192,
                    "capabilities": {
                        "text": true,
                        "json": true,
                        "tools": false,
                        "embeddings": false,
                        "images": false,
                        "streaming": false
                    }
                }
            ]
        },
        {
            "id": "ollama-local",
            "title": "Ollama local runtime",
            "type": "openai-compatible",
            "enabled": false,
            "endpoint": "http://127.0.0.1:11434/v1",
            "external": false,
            "local": true,
            "offline": true,
            "costType": "internal",
            "costLevel": 0,
            "capabilities": {
                "text": true,
                "json": true,
                "tools": true,
                "embeddings": true,
                "images": false,
                "streaming": true
            },
            "models": [],
            "runtime": {
                "kind": "ollama",
                "modelsEndpoint": "/models"
            },
            "hardware": {
                "cpu": true,
                "gpuRequired": false,
                "gpuOptional": true,
                "minRamGb": 8,
                "minDiskGb": 4
            }
        }
    ],
    "tools": {
        "count": 16
    },
    "secretsStored": 0,
    "schema": {
        "ok": true,
        "version": 1,
        "targetVersion": 1,
        "storageCount": 9,
        "moduleRecord": true
    }
}

Проверка конфигурации

[
    {
        "level": "warning",
        "code": "AI_DISABLED",
        "message": "Модуль AI отключен."
    },
    {
        "level": "warning",
        "code": "AI_TECH_USER_EMPTY",
        "message": "Не задан технический пользователь AI для фоновых задач."
    }
]

Эффективные лимиты

{
    "maxPromptChars": 20000,
    "maxSystemChars": 4000,
    "maxTokens": 4000,
    "maxModelCostLevel": null,
    "maxAgentSteps": 20,
    "maxToolCallsPerStep": 10,
    "maxToolInputBytes": 65536,
    "maxFileBytes": 10485760,
    "maxToolExecutionSeconds": 30,
    "maxConcurrentToolCalls": 4
}

Безопасные выключатели

{
    "AIEnabled": false,
    "ExternalModelsEnabled": false,
    "WriteToolsEnabled": false,
    "TechnicalUserLogin": ""
}
Инструменты AI
[
    {
        "id": "database.search",
        "title": "Поиск записей",
        "sourceModule": "Database",
        "sourceMethod": "FindRecords",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "database.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "dbn",
            "expression"
        ],
        "inputSchema": {
            "dbn": "string",
            "expression": "string",
            "sequence": "string",
            "limit": "integer",
            "offset": "integer",
            "format": "string"
        },
        "outputSchema": {
            "total": "integer",
            "records": "array"
        },
        "enabled": true
    },
    {
        "id": "database.getRecord",
        "title": "Чтение записи",
        "sourceModule": "Database",
        "sourceMethod": "RecRead",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "database.view",
            "record.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "dbn",
            "mfn"
        ],
        "inputSchema": {
            "dbn": "string",
            "mfn": "integer",
            "format": "string"
        },
        "outputSchema": {
            "record": "object",
            "formatted": "string"
        },
        "enabled": true
    },
    {
        "id": "database.getTerms",
        "title": "Чтение словаря",
        "sourceModule": "Database",
        "sourceMethod": "GetTermList",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "database.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "dbn",
            "prefix",
            "startTerm"
        ],
        "inputSchema": {
            "dbn": "string",
            "prefix": "string",
            "startTerm": "string",
            "limit": "integer",
            "backward": "boolean"
        },
        "outputSchema": {
            "terms": "array"
        },
        "enabled": true
    },
    {
        "id": "ec.getExemplarsInfo",
        "title": "Сведения об экземплярах",
        "sourceModule": "RQST",
        "sourceMethod": "GetExemplarsInfo",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "database.view",
            "record.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "dbn",
            "recordId"
        ],
        "inputSchema": {
            "dbn": "string",
            "recordId": "string"
        },
        "outputSchema": {
            "places": "array"
        },
        "enabled": true
    },
    {
        "id": "queue.getProgress",
        "title": "Статус задачи очереди",
        "sourceModule": "Queue",
        "sourceMethod": "GetProgress",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "queue.viewOwnOrAdmin"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "taskId"
        ],
        "inputSchema": {
            "taskId": "string"
        },
        "outputSchema": {
            "progress": "number",
            "progressmsg": "string",
            "lastactivity": "integer"
        },
        "enabled": true
    },
    {
        "id": "help.getPage",
        "title": "Чтение раздела Help",
        "sourceModule": "Help",
        "sourceMethod": "GetHelpClassMd",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "help.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "path"
        ],
        "inputSchema": {
            "path": "string",
            "plainText": "boolean"
        },
        "outputSchema": {
            "title": "string",
            "text": "string",
            "links": "array"
        },
        "enabled": true
    },
    {
        "id": "ft.getText",
        "title": "Чтение подготовленного FT-текста",
        "sourceModule": "FT",
        "sourceMethod": "GetPreparedText",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "ft.view",
            "sourceFile.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "sid"
        ],
        "inputSchema": {
            "sid": "string",
            "maxChars": "integer",
            "chunkingProfile": "string",
            "chunkSize": "integer",
            "chunkOverlap": "integer",
            "includeCoordinates": "boolean",
            "words": "array",
            "maxCoords": "integer"
        },
        "outputSchema": {
            "text": "string",
            "chunks": "array",
            "truncated": "boolean",
            "coordinates": "object"
        },
        "enabled": true
    },
    {
        "id": "ft.extractText",
        "title": "Извлечение текста из файла",
        "sourceModule": "FT",
        "sourceMethod": "ExtractText",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "ft.view",
            "sourceFile.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "sid"
        ],
        "inputSchema": {
            "sid": "string",
            "fileName": "string",
            "maxChars": "integer",
            "chunkingProfile": "string",
            "chunkSize": "integer",
            "chunkOverlap": "integer",
            "includeCoordinates": "boolean",
            "words": "array",
            "maxCoords": "integer"
        },
        "outputSchema": {
            "text": "string",
            "chunks": "array",
            "truncated": "boolean",
            "coordinates": "object"
        },
        "enabled": true
    },
    {
        "id": "ft.prepareDocument",
        "title": "Постановка подготовки FT-документа",
        "sourceModule": "FT",
        "sourceMethod": "StartIndexDocument",
        "mode": "queue",
        "enabledByDefault": false,
        "sideEffects": true,
        "confirmationPolicy": "requiresPolicy",
        "requiredRights": [
            "ft.view",
            "ft.prepare"
        ],
        "limits": {
            "maxCallsPerRequest": 1,
            "maxItems": 50,
            "timeoutSec": 3600
        },
        "requiredInput": [
            "sid"
        ],
        "inputSchema": {
            "sid": "string",
            "sourceText": "string",
            "sourceUrl": "string"
        },
        "outputSchema": {
            "taskId": "string"
        },
        "enabled": true
    },
    {
        "id": "ft.ocr",
        "title": "OCR документа",
        "sourceModule": "FT",
        "sourceMethod": "OCRTesseract",
        "mode": "queue",
        "enabledByDefault": false,
        "sideEffects": true,
        "confirmationPolicy": "requiresPolicy",
        "requiredRights": [
            "ft.view",
            "ft.ocr"
        ],
        "limits": {
            "maxCallsPerRequest": 1,
            "maxItems": 50,
            "timeoutSec": 3600
        },
        "requiredInput": [
            "sid"
        ],
        "inputSchema": {
            "sid": "string",
            "pages": "array"
        },
        "outputSchema": {
            "taskId": "string"
        },
        "enabled": true
    },
    {
        "id": "ft.transcribe",
        "title": "Транскрибация аудио/видео",
        "sourceModule": "FT",
        "sourceMethod": "Transcribe",
        "mode": "queue",
        "enabledByDefault": false,
        "sideEffects": true,
        "confirmationPolicy": "requiresPolicy",
        "requiredRights": [
            "ft.view",
            "ft.transcribe"
        ],
        "limits": {
            "maxCallsPerRequest": 1,
            "maxItems": 50,
            "timeoutSec": 3600
        },
        "requiredInput": [
            "sid"
        ],
        "inputSchema": {
            "sid": "string",
            "filein": "string",
            "provider": "string"
        },
        "outputSchema": {
            "taskId": "string"
        },
        "enabled": true
    },
    {
        "id": "record.createDraft",
        "title": "Создание черновика записи",
        "sourceModule": "AI",
        "sourceMethod": "DraftCreate",
        "mode": "draft",
        "enabledByDefault": false,
        "sideEffects": true,
        "confirmationPolicy": "requiresHumanConfirmation",
        "requiredRights": [
            "database.view",
            "record.createDraft"
        ],
        "limits": {
            "maxCallsPerRequest": 1,
            "maxItems": 50,
            "timeoutSec": 3600
        },
        "requiredInput": [
            "targetDbn",
            "recordType",
            "fields"
        ],
        "inputSchema": {
            "targetDbn": "string",
            "recordType": "string",
            "fields": "object"
        },
        "outputSchema": {
            "draftId": "string",
            "diff": "array"
        },
        "enabled": true
    },
    {
        "id": "record.validateDraft",
        "title": "Проверка черновика записи",
        "sourceModule": "AI",
        "sourceMethod": "DraftValidate",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "record.validateDraft"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "draftId"
        ],
        "inputSchema": {
            "draftId": "string"
        },
        "outputSchema": {
            "messages": "array"
        },
        "enabled": true
    },
    {
        "id": "record.findDuplicates",
        "title": "Поиск дублей записи",
        "sourceModule": "Database",
        "sourceMethod": "FindRecords",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "database.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "dbn",
            "keys"
        ],
        "inputSchema": {
            "dbn": "string",
            "keys": "object",
            "limit": "integer",
            "format": "string"
        },
        "outputSchema": {
            "matches": "array"
        },
        "enabled": true
    },
    {
        "id": "rag.semanticSearch",
        "title": "Semantic search",
        "sourceModule": "AI",
        "sourceMethod": "SemanticSearch",
        "mode": "read",
        "enabledByDefault": true,
        "sideEffects": false,
        "confirmationPolicy": "none",
        "requiredRights": [
            "source.view"
        ],
        "limits": {
            "maxCallsPerRequest": 10,
            "maxItems": 50,
            "timeoutSec": 30
        },
        "requiredInput": [
            "indexId",
            "query"
        ],
        "inputSchema": {
            "indexId": "string",
            "query": "string",
            "limit": "integer",
            "sourceType": "string",
            "path": "string",
            "sid": "string",
            "chunkingProfile": "string",
            "chunkSize": "integer",
            "chunkOverlap": "integer",
            "includeCoordinates": "boolean",
            "words": "array",
            "maxCoords": "integer"
        },
        "outputSchema": {
            "matches": "array"
        },
        "enabled": true
    },
    {
        "id": "imageCatalog.toBibDraft",
        "title": "Дополнение ИМИДЖ-записи библиографическими полями",
        "sourceModule": "AI",
        "sourceMethod": "ImageCatalogToBibDraft",
        "mode": "agent",
        "enabledByDefault": false,
        "sideEffects": true,
        "confirmationPolicy": "requiresHumanConfirmation",
        "requiredRights": [
            "database.view",
            "record.createDraft"
        ],
        "limits": {
            "maxCallsPerRequest": 1,
            "maxItems": 50,
            "timeoutSec": 3600
        },
        "requiredInput": [
            "sourceDbn",
            "sourceMfn"
        ],
        "inputSchema": {
            "sourceDbn": "string",
            "sourceMfn": "integer",
            "mappingProfile": "string",
            "autoCreateReview": "boolean",
            "reviewOnIssuesOnly": "boolean",
            "forceNew": "boolean"
        },
        "outputSchema": {
            "draftId": "string",
            "reviewRequired": "boolean",
            "review": "object",
            "duplicateCheck": "object",
            "target": "object"
        },
        "enabled": true
    }
]

Поставщики и маршрутизация моделей

Проверка provider


[
    {
        "id": "cloud-openai-compatible",
        "title": "Cloud OpenAI-compatible endpoint",
        "type": "openai-compatible",
        "enabled": false,
        "endpoint": "",
        "external": true,
        "local": false,
        "offline": false,
        "costType": "paid",
        "costLevel": 5,
        "capabilities": {
            "text": true,
            "json": true,
            "tools": true,
            "embeddings": true,
            "images": true,
            "streaming": true
        },
        "models": []
    },
    {
        "id": "local-openai-compatible",
        "title": "Local OpenAI-compatible endpoint",
        "type": "openai-compatible",
        "enabled": false,
        "endpoint": "http://127.0.0.1:11434/v1",
        "external": false,
        "local": true,
        "offline": true,
        "costType": "internal",
        "costLevel": 0,
        "capabilities": {
            "text": true,
            "json": true,
            "tools": true,
            "embeddings": true,
            "images": false,
            "streaming": true
        },
        "models": []
    },
    {
        "id": "mock",
        "title": "Mock provider",
        "type": "mock",
        "enabled": true,
        "endpoint": "",
        "external": false,
        "local": true,
        "offline": true,
        "costType": "free",
        "costLevel": 0,
        "capabilities": {
            "text": true,
            "json": true,
            "tools": false,
            "embeddings": false,
            "images": false,
            "streaming": false
        },
        "models": [
            {
                "providerId": "mock",
                "id": "mock-text",
                "enabled": true,
                "title": "Mock text model",
                "costType": "free",
                "costLevel": 0,
                "qualityLevel": 1,
                "maxContext": 8192,
                "capabilities": {
                    "text": true,
                    "json": true,
                    "tools": false,
                    "embeddings": false,
                    "images": false,
                    "streaming": false
                }
            }
        ]
    },
    {
        "id": "ollama-local",
        "title": "Ollama local runtime",
        "type": "openai-compatible",
        "enabled": false,
        "endpoint": "http://127.0.0.1:11434/v1",
        "external": false,
        "local": true,
        "offline": true,
        "costType": "internal",
        "costLevel": 0,
        "capabilities": {
            "text": true,
            "json": true,
            "tools": true,
            "embeddings": true,
            "images": false,
            "streaming": true
        },
        "models": [],
        "runtime": {
            "kind": "ollama",
            "modelsEndpoint": "/models"
        },
        "hardware": {
            "cpu": true,
            "gpuRequired": false,
            "gpuOptional": true,
            "minRamGb": 8,
            "minDiskGb": 4
        }
    }
]

Выбор модели и fallback


Инвалидирование производных данных


Последние события аудита

{
    "ok": false,
    "error": {
        "code": "AI_AUDIT_ACCESS_DENIED",
        "message": "Only an administrator can read AI audit events."
    }
}

Отчет о внешней передаче данных

{
    "ok": false,
    "error": {
        "code": "AI_AUDIT_ACCESS_DENIED",
        "message": "Only an administrator can read AI audit events."
    }
}