-
Notifications
You must be signed in to change notification settings - Fork 1.3k
feat(deepreasearch): add Redis Support and update ReporterNode logic #1297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 在 pom.xml 中添加 spring-boot-starter-data-redis 依赖。 - 更新 DeepResearchConfiguration,注入 ReportRedisService。 - 修改 ReporterNode,增加将报告保存到 Redis 的功能,并记录线程 ID。 - 在 application.yml 中添加 Redis 配置。
huangzhen seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
…可读性更高。同时,调整了 ReporterNode 中的异常处理逻辑,增强了代码的健壮性。
mvn spring-javaformat:apply |
.mapResult(response -> { | ||
String finalReport = Objects.requireNonNull(response.getResult().getOutput().getText()); | ||
try { | ||
reportRedisService.saveReport(threadId, finalReport); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
给Redis配置设个开关吧。开启了才向Redis里写入报告,这样可以不阻碍其他人的开发进度,要求他们配置redis了
/** | ||
* 基础响应类 | ||
*/ | ||
public static class BaseResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
controller的请求、响应类之类的这里还是放到model目录下,方便管理
application: | ||
name: spring-ai-alibaba-deepresearch | ||
# Redis 配置 | ||
data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
前缀为:spring.ai.alibaba.deepresearch.redis
设置一个enabled开关,来控制Redis服务的加载
在 DeepResearchConfiguration 和 ReporterNode 中用 ReportService 替换 ReportRedisService,统一报告处理方式 更新 ReportController 改用 ReportService 进行报告操作 在 RedisConfig 和 ReportRedisService 中引入 ConditionalOnProperty 注解,根据配置启用/禁用 Redis 支持 修改 application.yml 默认将 Redis 启用属性设为 false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
feat(deepresearch): 添加 Redis 支持并更新 ReporterNode 逻辑