feat: изменил логику анализа отзывов
Backend CI / build-and-test (push) Failing after 14m19s
🚀 Create and publish a Docker image / Detect changes in backend and frontend (push) Failing after 12m5s
Frontend CI / build-and-check (push) Failing after 17m58s
🚀 Create and publish a Docker image / Build & publish frontend image (push) Failing after 10m11s
🚀 Create and publish a Docker image / Build & publish backend image (push) Failing after 11m3s
🚀 Create and publish a Docker image / Update stack on Portainer (push) Failing after 14m58s

This commit is contained in:
2026-05-22 01:30:41 +03:00
parent 168d6af860
commit 8ac593d36f
36 changed files with 858 additions and 457 deletions
+13 -66
View File
@@ -2445,7 +2445,7 @@
"Reviews"
],
"summary": "Создать отзыв к лекции.",
"description": "Только Student. После создания отзыв помещается в очередь LLM-анализа\n(статус `Pending`). LLM оценивает содержательность и начисляет монеты\nскрытно от пользователя.\n\n**Required roles:** Student",
"description": "Только Student. После создания отзыв отправляется на LLM-анализ\n(статус `Pending`). LLM оценивает содержательность и начисляет монеты\nскрытно от пользователя.\n\n**Required roles:** Student",
"requestBody": {
"description": "ID лекции, оценка (Like/Neutral/Dislike) и текст отзыва.",
"content": {
@@ -2531,6 +2531,13 @@
"summary": "Получить список всех отзывов.",
"description": "Только Admin. Возвращает все отзывы независимо от LLM-статуса.\n\n**Required roles:** Admin",
"parameters": [
{
"name": "LlmStatus",
"in": "query",
"schema": {
"$ref": "#/components/schemas/ReviewLlmStatus"
}
},
{
"name": "Page",
"in": "query",
@@ -2920,77 +2927,13 @@
]
}
},
"/api/v1/reviews/pending": {
"get": {
"tags": [
"Reviews"
],
"summary": "Получить список отзывов, ожидающих LLM-анализа.",
"description": "Только Admin. Используется для мониторинга очереди обработки.\n\n**Required roles:** Admin",
"parameters": [
{
"name": "Page",
"in": "query",
"schema": {
"type": "integer",
"format": "int32"
}
},
{
"name": "PageSize",
"in": "query",
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"200": {
"description": "Список отзывов со статусом Pending (пагинированный).",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReviewDtoPagedResult"
}
}
}
},
"401": {
"description": "Требуется аутентификация.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
},
"403": {
"description": "Требуется роль Admin.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProblemDetails"
}
}
}
}
},
"security": [
{
"Bearer": [ ]
}
]
}
},
"/api/v1/reviews/{id}/reanalyze": {
"post": {
"tags": [
"Reviews"
],
"summary": "Запустить повторный LLM-анализ отзыва.",
"description": "Только Admin. Сбрасывает статус отзыва на `Pending` и ставит его\nв очередь на повторную обработку фоновым сервисом.\n\n**Required roles:** Admin",
"description": "Только Admin. Сбрасывает статус отзыва на `Pending` и отправляет его\nна повторную обработку.\n\n**Required roles:** Admin",
"parameters": [
{
"name": "id",
@@ -5582,6 +5525,10 @@
},
"nullable": true
},
"llmRawOutput": {
"type": "string",
"nullable": true
},
"createdAt": {
"type": "string",
"format": "date-time"