文件最后提交记录最后更新时间
feat: fix time tool example Signed-off-by: shown.Ji <yuluo08290126@gmail.com> 9 个月前
chore(examples): add .env.example for MCP/RAG/tool-calling modules (#453) Co-authored-by: however <however-yir@users.noreply.github.com> Co-authored-by: shown <yuluo08290126@gmail.com>1 个月前
Feat claudecode skill (#408) * feat: 为项目生成完整的API文档和模块文档 - 新增Claude Code技能框架:http-generate、readme-generate、skill-creator - 为76个包含Web接口的模块生成.http文件,涵盖100+个Controller类 - 为46个缺少文档的模块生成README.md文件,包含完整的API文档和使用说明 - 更新CLAUDE.md文件,提供项目开发指导 - 新增task/module-generate.md文档,描述自动化文档生成任务 生成的文档特点: - HTTP文件:包含完整的REST API请求示例,支持IDE直接运行 - README文件:统一的中文文档格式,包含功能介绍、API文档、使用示例、技术实现等 - 提升项目文档完整性,降低开发者学习和使用门槛 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: 恢复被覆盖的重要README文件,整合原有技术文档与新生成API文档 ## 恢复的关键文档 ### RAG相关模块 - **rag-milvus-example**: 恢复Milvus向量数据库配置、Docker部署、集合加载步骤 - **rag-elasticsearch-example**: 恢复Local/Cloud RAG流程详解、Elasticsearch配置 - **rag-pgvector-example**: 恢复PostgreSQL+pgvector数据库创建脚本、HNSW索引配置 - **rag-openai-dashscope-pgvector-example**: 恢复MXY RAG Server架构、多模型集成 - **module-rag**: 恢复Spring AI Module RAG技术架构、Pre-Retrieval模块详解 ### 基础模块 - **helloworld**: 恢复完整的入门示例,包含环境配置、快速开始指南 ## 恢复的重要内容 ### 技术实现细节 - 详细的数据库配置和SQL脚本 - Docker Compose部署指南 - 向量索引创建和优化配置 - RAG流程的完整技术说明 ### 配置和部署 - application.yml完整配置示例 - 环境变量和依赖说明 - 性能优化建议 - 故障排查指南 ### API文档整合 - 保留新生成的标准化API文档格式 - 整合原有的curl命令示例 - 统一的接口说明和参数描述 ## 改进效果 ✅ **技术完整性**: 恢复了丢失的重要技术实现细节 ✅ **配置完整性**: 保留了完整的部署和配置说明 ✅ **文档一致性**: 统一了文档格式,同时保留了重要信息 ✅ **可用性提升**: 开发者可以获得完整的使用指南 ## 文件统计 - 恢复了6个重要的README文件 - 保留了原有的技术细节和配置说明 - 整合了新生成的API文档格式 - 新增readme-overwrite.md任务文档 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: doc * fix: doc --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>5 个月前
chore: add license and newline 7 个月前
feat: fix time tool example Signed-off-by: shown.Ji <yuluo08290126@gmail.com> 9 个月前
Feat claudecode skill (#408) * feat: 为项目生成完整的API文档和模块文档 - 新增Claude Code技能框架:http-generate、readme-generate、skill-creator - 为76个包含Web接口的模块生成.http文件,涵盖100+个Controller类 - 为46个缺少文档的模块生成README.md文件,包含完整的API文档和使用说明 - 更新CLAUDE.md文件,提供项目开发指导 - 新增task/module-generate.md文档,描述自动化文档生成任务 生成的文档特点: - HTTP文件:包含完整的REST API请求示例,支持IDE直接运行 - README文件:统一的中文文档格式,包含功能介绍、API文档、使用示例、技术实现等 - 提升项目文档完整性,降低开发者学习和使用门槛 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: 恢复被覆盖的重要README文件,整合原有技术文档与新生成API文档 ## 恢复的关键文档 ### RAG相关模块 - **rag-milvus-example**: 恢复Milvus向量数据库配置、Docker部署、集合加载步骤 - **rag-elasticsearch-example**: 恢复Local/Cloud RAG流程详解、Elasticsearch配置 - **rag-pgvector-example**: 恢复PostgreSQL+pgvector数据库创建脚本、HNSW索引配置 - **rag-openai-dashscope-pgvector-example**: 恢复MXY RAG Server架构、多模型集成 - **module-rag**: 恢复Spring AI Module RAG技术架构、Pre-Retrieval模块详解 ### 基础模块 - **helloworld**: 恢复完整的入门示例,包含环境配置、快速开始指南 ## 恢复的重要内容 ### 技术实现细节 - 详细的数据库配置和SQL脚本 - Docker Compose部署指南 - 向量索引创建和优化配置 - RAG流程的完整技术说明 ### 配置和部署 - application.yml完整配置示例 - 环境变量和依赖说明 - 性能优化建议 - 故障排查指南 ### API文档整合 - 保留新生成的标准化API文档格式 - 整合原有的curl命令示例 - 统一的接口说明和参数描述 ## 改进效果 ✅ **技术完整性**: 恢复了丢失的重要技术实现细节 ✅ **配置完整性**: 保留了完整的部署和配置说明 ✅ **文档一致性**: 统一了文档格式,同时保留了重要信息 ✅ **可用性提升**: 开发者可以获得完整的使用指南 ## 文件统计 - 恢复了6个重要的README文件 - 保留了原有的技术细节和配置说明 - 整合了新生成的API文档格式 - 新增readme-overwrite.md任务文档 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: doc * fix: doc --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>5 个月前
README.md

Tool Calling Example

Demonstrate four approaches to ToolCalling with four distinct examples here:

  • TimeController : Methods as Tools
  • AddressController : Methods as Tools - MethodToolCallback
  • BaiduTranslateController : Function as Tools - Function Name
  • WeatherController : Function as Tools - FunctionCallBack

If you want to build your own tools, you can refer to the implementation in the community module of the Spring AI Alibaba repository and use the currently stable version 1.0.0.2.

More available tools can be found on this documentation. For mcp style tools please check spring-ai-alibaba-mcp-example.

For more detail information: spring-ai-tools

接口文档

TimeController 接口

1. simpleChat 方法

接口路径: GET /time/chat

功能描述: No Tool

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/time/chat

2. chatWithTimeFunction 方法

接口路径: GET /time/chat-tool-method

功能描述: 提供 chatWithTimeFunction 相关功能

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/time/chat-tool-method

AddressController 接口

1. chat 方法

接口路径: GET /address/chat

功能描述: No Tool

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/address/chat

2. chatWithBaiduMap 方法

接口路径: GET /address/chat-method-tool-callback

功能描述: Methods as Tools - MethodToolCallback

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/address/chat-method-tool-callback

BaiduTranslateController 接口

1. simpleChat 方法

接口路径: GET /translate/chat

功能描述: No Tool

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/translate/chat

2. chatTranslateFunction 方法

接口路径: GET /translate/chat-tool-function-callback

功能描述: 提供 chatTranslateFunction 相关功能

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/translate/chat-tool-function-callback

WeatherController 接口

1. simpleChat 方法

接口路径: GET /weather/chat

功能描述: No Tool

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/weather/chat

2. chatWithWeatherFunction 方法

接口路径: GET /weather/chat-tool-function-name

功能描述: 提供 chatWithWeatherFunction 相关功能

主要特性:

  • 基于 Spring Boot REST API 实现
  • 返回 JSON 格式响应
  • 支持 UTF-8 编码

使用场景:

  • AI 对话交互
  • 智能问答系统
  • API 集成测试

示例请求:

GET http://localhost:8080/weather/chat-tool-function-name

技术实现

核心组件

  • Spring Boot: 应用框架
  • Spring AI Alibaba: AI 功能集成
  • REST Controller: HTTP 接口处理
  • spring-boot-starter-web: 核心依赖
  • spring-ai-alibaba-starter-dashscope: 核心依赖
  • spring-ai-alibaba-starter-tool-calling-baidutranslate: 核心依赖
  • spring-ai-alibaba-starter-tool-calling-weather: 核心依赖
  • spring-ai-alibaba-starter-tool-calling-baidumap: 核心依赖

配置要点

  • 需要配置 AI_DASHSCOPE_API_KEY 环境变量
  • 默认端口:8080
  • 默认上下文路径:/basic

测试指导

使用 HTTP 文件测试

模块根目录下提供了 spring-ai-alibaba-tool-calling-example.http 文件,包含所有接口的测试用例:

  • 可在 IDE 中直接执行
  • 支持参数自定义
  • 提供默认示例参数

使用 curl 测试

# simpleChat 接口测试
curl "http://localhost:8080/time/chat"
# chat 接口测试
curl "http://localhost:8080/address/chat"

注意事项

  1. 环境变量: 确保 AI_DASHSCOPE_API_KEY 已正确设置
  2. 网络连接: 需要能够访问阿里云 DashScope 服务
  3. 字符编码: 所有响应使用 UTF-8 编码,支持中文内容
  4. 端口配置: 确保端口 8080 未被占用

此 README.md 由自动化工具生成于 2025-12-11 00:51:02

模块说明

Demonstrate four approaches to ToolCalling with four distinct examples here:。

How to Run

Baidu translation API access document: https://api.fanyi.baidu.com/product/113

Baidu Map API document: https://lbs.baidu.com/faq/api

Access document of weather forecast API: https://www.weatherapi.com/docs/

spring:
  ai:
    alibaba:
      toolcalling:
        baidu:
          translate:
            enabled: true
            app-id: ${BAIDU_TRANSLATE_APP_ID}
            secret-key: ${BAIDU_TRANSLATE_SECRET_KEY}
          map:
            enabled: true
            apiKey: ${BAIDU_MAP_API_KEY}

        time:
          enabled: true

        weather:
          enabled: true
          api-key: ${WEATHER_API_KEY}

    dashscope:
      api-key: ${AI_DASHSCOPE_API_KEY}


此 README.md 由自动化工具融合更新于 2025-12-11 00:40:51

融合策略:保留了原有的技术文档内容,并添加了自动生成的 API 文档部分


此 README.md 由自动化工具融合更新于 2025-12-11 00:51:02

融合策略:保留了原有的技术文档内容,并添加了自动生成的 API 文档部分