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
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:
@@ -15,6 +15,7 @@ public record ReviewDto(
|
||||
double? QualityScore,
|
||||
bool? IsInformative,
|
||||
string[]? LlmTags,
|
||||
string? LlmRawOutput,
|
||||
DateTime CreatedAt
|
||||
);
|
||||
|
||||
@@ -22,6 +23,12 @@ public record CreateReviewRequest(int LectureId, ReviewRating Rating, string? Te
|
||||
|
||||
public record UpdateReviewRequest(ReviewRating Rating, string? Text);
|
||||
|
||||
public record ReviewFilterRequest(
|
||||
ReviewLlmStatus? LlmStatus,
|
||||
int Page = 1,
|
||||
int PageSize = 20
|
||||
);
|
||||
|
||||
public record ReviewPromptDto(string Prompt, DateTime? UpdatedAt);
|
||||
|
||||
public record UpdateReviewPromptRequest(string Prompt);
|
||||
|
||||
@@ -3,5 +3,4 @@ namespace UniVerse.Application.Interfaces;
|
||||
public interface ILlmAnalysisService
|
||||
{
|
||||
Task AnalyzeReviewAsync(int reviewId);
|
||||
Task ProcessPendingReviewsAsync();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,8 @@ public record LlmReviewAnalysis(
|
||||
double QualityScore,
|
||||
string Sentiment,
|
||||
string[] Tags,
|
||||
bool IsInformative
|
||||
bool IsInformative,
|
||||
string RawOutput
|
||||
);
|
||||
|
||||
public interface ILlmClient
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace UniVerse.Application.Interfaces;
|
||||
|
||||
public interface IReviewAnalysisQueue
|
||||
{
|
||||
Task EnqueueAsync(int reviewId, CancellationToken cancellationToken = default);
|
||||
}
|
||||
@@ -11,7 +11,6 @@ public interface IReviewService
|
||||
Task DeleteAsync(int id, int userId, bool isAdmin = false);
|
||||
Task<PagedResult<ReviewDto>> GetByLectureAsync(int lectureId, PaginationRequest pagination);
|
||||
Task<PagedResult<ReviewDto>> GetByUserAsync(int userId, PaginationRequest pagination);
|
||||
Task<PagedResult<ReviewDto>> GetAllAsync(PaginationRequest pagination);
|
||||
Task<PagedResult<ReviewDto>> GetPendingAsync(PaginationRequest pagination);
|
||||
Task<PagedResult<ReviewDto>> GetAllAsync(ReviewFilterRequest filter);
|
||||
Task ReanalyzeAsync(int id);
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ public static class MappingExtensions
|
||||
review.UserId, review.User?.DisplayName,
|
||||
review.Rating, review.Text, review.LlmStatus,
|
||||
review.Sentiment, review.QualityScore, review.IsInformative,
|
||||
review.LlmTags, review.CreatedAt
|
||||
review.LlmTags, review.LlmRawOutput, review.CreatedAt
|
||||
);
|
||||
|
||||
// --- Achievement ---
|
||||
|
||||
Reference in New Issue
Block a user