feat: 新增AI聊天服务,重构任务提示词相关逻辑

1.  新增AI聊天服务接口、实现、控制器及相关DTO、配置类
2.  调整JournalPageTaskTypeEnum枚举值修正
3.  合并任务的基础Prompt和自定义Prompt为单个Prompt字段
4.  精简任务输出DTO冗余属性
This commit is contained in:
glz
2026-06-24 15:06:40 +08:00
parent 28a0c3cfe4
commit bf333cd718
11 changed files with 300 additions and 102 deletions

View File

@ -1,4 +1,4 @@
using Mapster;
using Mapster;
using QYZH.InteractiveMagazine.Common.Extensions;
using QYZH.InteractiveMagazine.Infrastructure.OSS;
using QYZH.InteractiveMagazine.IService;
@ -66,8 +66,7 @@ public class JournalPageTaskService(BaseRepository<Journal> journalRepository, O
task.Expression = input.Expression;
task.Persuasiveness = input.Persuasiveness;
task.AnswerTime = input.AnswerTime;
task.BasePrompt = input.BasePrompt;
task.CustomPrompt = input.CustomPrompt;
task.Prompt = input.Prompt;
var no = input.No.Split('-').Select(int.Parse).ToArray();
@ -97,7 +96,6 @@ public class JournalPageTaskService(BaseRepository<Journal> journalRepository, O
JournalPageId = task.JournalPageId,
No = task.No,
Type = task.Type,
Task = task.Task,
Points = task.Points,
GrowthPoint = task.GrowthPoint ?? 0,
Comprehension = task.Comprehension,
@ -105,6 +103,7 @@ public class JournalPageTaskService(BaseRepository<Journal> journalRepository, O
Expression = task.Expression,
Persuasiveness = task.Persuasiveness,
AnswerTime = task.AnswerTime,
Prompt = task.Prompt
};
// 查询答案列表