Discover MCPs & agents
Loading MCPs and agents…
Loading MCPs and agents…
基于 Spring Boot 3.4.5 + Java 21 + Spring Al + LangChain4j + DashScope + Ollama 的智能AI交互系统🤖实战项目,适用于AI应用开发、智能体构建等场景。项目从基础模型调用到RAG知识库问答📚再到工具规划与MCP服务集成,完整覆盖了Al Agent🧠的核心技术,包括多模型接入、上下文记忆、ReAct智能规划、多模态支持🖼️、自定义工具开发等解决方案。
Fetched from the repository for this visit.
基于Spring AI和LangChain4j构建的智能AI交互系统,支持多种大模型接入、知识库问答和工具调用能力。
Len AI Agent是一个以AI开发为核心的智能体项目,旨在提供强大的AI交互能力,包括:
项目集成了主流AI大模型,如阿里云DashScope的通义千问、Ollama本地部署模型等,同时支持多种AI框架,使开发者能够快速构建智能应用。
len-ai-agent/
├── src/
│ ├── main/
│ │ ├── java/
│ │ │ └── com/
│ │ │ └── lenyan/
│ │ │ └── lenaiagent/
│ │ │ ├── controller/ # 接口控制器
│ │ │ ├── demo/ # 示例代码
│ │ │ │ └── invoke/ # 不同调用方式示例
│ │ │ ├── config/ # 配置类
│ │ │ ├── service/ # 服务实现
│ │ │ ├── model/ # 数据模型
│ │ │ └── LenAiAgentApplication.java # 启动类
│ │ └── resources/
│ │ ├── application.yml # 通用配置
│ │ └── application-local.yml # 本地环境配置
│ └── test/ # 测试代码
└── pom.xml # 项目依赖
git clone https://github.com/yourusername/len-ai-agent.git
cd len-ai-agent
修改 src/main/resources/application-local.yml 文件中的API密钥:
spring:
ai:
dashscope:
api-key: 你的DashScope API密钥
如需使用本地大模型,请安装并启动Ollama:
# 安装Ollama后,拉取模型
ollama pull deepseek-r1:7b
# 启动服务 (默认端口11434)
ollama serve
mvn spring-boot:run -Dspring-boot.run.profiles=local
打开浏览器访问 http://localhost:8102/api/swagger-ui.html
@Resource
private ChatModel dashscopeChatModel;
public String chat(String input) {
AssistantMessage response = dashscopeChatModel.call(new Prompt(input))
.getResult()
.getOutput();
return response.getText();
}
ChatLanguageModel model = QwenChatModel.builder()
.apiKey("your-api-key")
.modelName("qwen-max")
.build();
String answer = model.chat("你好,我想了解一下AI Agent");
本项目使用 MIT 许可证
欢迎提交Issue或Pull Request!
git checkout -b feature/your-feature)git commit -am 'Add some feature')git push origin feature/your-feature)本项目是"lenAI超级智能体"系列的实现,旨在帮助开发者快速掌握AI开发技术,构建智能应用。
GitHub checked 16h ago - refresh overdue. Recently viewed repositories target hourly refresh.