Skip to content

添加评估器-优化器模式实现 #34

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

Open
wants to merge 52 commits into
base: main
Choose a base branch
from

Conversation

liu-657667
Copy link
Collaborator

  • 新增 spring-ai-evaluator-optimizer 模块
  • 实现了评估器-优化器模式的完整工作流
  • 添加了生成器服务、评估器服务和评估优化服务- 定义了各阶段的请求/响应模型
    -集成了阿里云的 Qwen模型
  • 提供了 REST API 接口和健康检查功能
  • 编写了详细的 README 文档说明使用方法和配置

#19

sunknightzy and others added 30 commits June 7, 2025 22:42
feat: add vector store redis simple
…with_workflow

feat: build agent with workflow
- 将 spring.ai.openai.chat.api-key 更名为 spring.ai.openai.api-key
- 统一 API 密钥配置,解决潜在的配置错误问题
glmapper and others added 21 commits June 23, 2025 09:26
- 将 spring.ai.openai.chat.api-key 更名为 spring.ai.openai.api-key
- 新增 spring-ai-observability 模块,包含 metric 和 tracing 两个子模块
- 实现了对 AI 模型调用的监控、追踪和可观测性管理
- 集成了 OpenAI 客户端、Redis VectorStore 和 Zipkin 分布式追踪
- 提供了聊天、图像生成、文本嵌入等功能的 REST 接口
- 添加了 Prometheus 指标和健康检查支持
- 将 image 方法的返回类型从 void改为 String
- 移除了 HttpServletResponse 参数
- 直接返回图像 URL 字符串,而不是通过输出流传输图像数据
- 在 metric 和 tracing模块的 README 文件中,将 application.yml 的路径从绝对路径修改为相对路径
- 优化文档的可读性和通用性,避免特定于某个用户的路径
* fix(spring-ai-chat-qwen): 修复 API 密钥配置问题

- 将 spring.ai.openai.chat.api-key 更名为 spring.ai.openai.api-key
- 统一 API 密钥配置,解决潜在的配置错误问题

* feat(spring-ai-observability): 添加可观察性模块

- 新增 spring-ai-observability 模块,包含 metric 和 tracing 两个子模块
- 实现了对 AI 模型调用的监控、追踪和可观测性管理
- 集成了 OpenAI 客户端、Redis VectorStore 和 Zipkin 分布式追踪
- 提供了聊天、图像生成、文本嵌入等功能的 REST 接口
- 添加了 Prometheus 指标和健康检查支持

* refactor(spring-ai-observability-metric): 优化 image 控制器的实现

- 将 image 方法的返回类型从 void改为 String
- 移除了 HttpServletResponse 参数
- 直接返回图像 URL 字符串,而不是通过输出流传输图像数据

* docs(spring-ai-observability): 更新快速启动指南中的配置文件路径

- 在 metric 和 tracing模块的 README 文件中,将 application.yml 的路径从绝对路径修改为相对路径
- 优化文档的可读性和通用性,避免特定于某个用户的路径
* fix mcp-client config yaml format bug,
fix pom http dependency bug.
due to these bugs, mcp-sample can not run success

* add readme add evn config
增加了配置全局LLM key的使用方式说明,无需每次调整对应的配置文件

---------

Co-authored-by: hyz <huyuzhou@youzan.com>
- 新增 Nacos MCP 客户端模块,实现基于 Nacos 的服务发现和 MCP 协议通信
- 新增 Nacos MCP 服务端模块,提供天气查询工具服务
- 添加相关配置文件、控制器、服务和工具类
- 更新项目结构,增加新模块的引用
- 移除了 Nacos客户端和服务器应用中的未使用导入
- 删除了 Nacos 客户端应用中的冗余代码片段
- 清理了 Nacos 服务器应用中的多余导入和代码
- 将 OpenAI API 密钥配置从硬编码改为使用环境变量
- 提高了配置的灵活性和安全性
- 将 NacoseClientApplication 重命名为 NacosClientApplication
- 将 NacoseServerApplication 重命名为 NacosServerApplication
- 更新相关 README 文件中的类名引用
# Conflicts:
#	README.md
#	README_EN.md
- 新增 spring-ai-evaluator-optimizer 模块
- 实现了评估器-优化器模式的完整工作流
- 添加了生成器服务、评估器服务和评估优化服务- 定义了各阶段的请求/响应模型
-集成了阿里云的 Qwen模型
- 提供了 REST API 接口和健康检查功能
- 编写了详细的 README 文档说明使用方法和配置
@@ -19,6 +19,7 @@
<modules>
<module>spring-ai-workflow</module>
<module>spring-ai-agent-orchestrator</module>
<module>spring-ai-evaluator-optimizer</module>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

spring-ai-agent-evaluator-optimizer


### 环境变量

应用支持多种AI模型配置,当前使用阿里云兼容模式:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该是都兼容 openai 协议的

<name>spring-ai-evaluator-optimizer</name>
<description>Evaluator Optimizer Agent Pattern Implementation</description>

<properties>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

去掉这里的 properties

<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 plugin 也不需要

* This application demonstrates the Evaluator-Optimizer pattern for iterative
* refinement of AI-generated solutions through generation, evaluation, and optimization cycles.
*
* @author glmapper
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

author 不是我 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants