Home
Softono
langboot

langboot

Open source Apache-2.0 Java
187
Stars
54
Forks
3
Issues
3
Watchers
5 months
Last Commit

About langboot

LangBoot is a Spring Boot-based framework designed to build AI applications using concepts from LangChain. It serves as a technical foundation for integrating Large Language Models without requiring model training or fine-tuning. The platform supports a wide range of LLMs including OpenAI, Baidu Wenxin, Zhipu AI, Kimi, and ChatGLM2, along with various embedding models and vector stores like Weaviate, Milvus, and PGVector. Key features include seamless connectivity to non-structured documents such as PDF, DOCX, and CSV for local knowledge base construction, search engine integration, and server-sent events for real-time streaming chat. The system offers comprehensive prompt engineering capabilities including summarization, translation, keyword extraction, text classification, content safety checks, and text-to-image generation. It also supports voice input and output, session and knowledge base management, and multi-modal tasks where applicable. The application stack includes Java 17, Spring Boot 3.1, MyBatis-

Platforms

Web Self-hosted

Languages

Java

Links

LangBoot

用langchain的思想,构建SpringBoot AI应用。

🚩 本项目未涉及AI模型的微调、训练过程,仅使用相关大语言模型作为技术底座实现相关功能,模型的使用请参看相关官方文档。

涉及技术栈

组件 版本
java 17+
SpringBoot 3.1.0
swagger-ui knife4j-openapi3-jakarta-spring-boot-starter
工具包 hutool-all
缓存 redis
json fastjson2
mysql mysql-connector-j
orm框架 mybatis-plus
openai库 openai-java
前端 freemarker、bootstrap、jquery、recorder.js
stream-chat SSE
LLMs openai、chatglm2、文心一言 、智谱AI、Kimi
embeddings openai、text2vec-transformers、文心一言
vector store weaviate、milvus、pgvector

langchain rag原理

原理图

模型能力矩阵

模型/能力 文本生成 流式输出 语音 函数调用 图片生成 多模态(VISION) 嵌入EMBEDDING
openai 支持 支持 支持 支持 支持 支持 支持
百度(文心) 支持 支持 - 支持 支持 - 支持
智谱(GLM-4) 支持 支持 - 支持 支持 支持 支持
kimi 支持 支持 - - - - -
chatglm2 支持 支持 - - - - -
... ... - - - - - - -

功能路线图

已完成本地知识库上传、及完成openai、chatglm2、百度、智谱GLM-4、kimi五个LLMs模型流式聊天功能。未来计划会接入更多大语言模型,以满足更多需求场景。

  • [ ] Langchain 知识库
    • [x] 接入非结构化文档(已支持 md、pdf、docx、txt、csv 等文件格式)
    • [x] 搜索引擎接入
    • [ ] 结构化数据接入(如Excel、SQL 等)
    • [ ] 知识图谱/图数据库接入
  • [ ] 系统功能
    • [ ] 用户
      • [x] 用户登录
      • [ ] 用户注册
      • [ ] 第三方登录
    • [x] 基于 SSE 实现 Stream Chat
    • [x] 语音输入输出
    • [x] 会话管理
    • [x] 知识库管理
    • [x] 支持搜索引擎问答
  • [ ] prompts相关功能
    • [x] 摘要
    • [x] 翻译
    • [x] 关键词
    • [x] 文本分类
    • [x] 内容安全
    • [x] 偏好分析
    • [ ] 查重
    • [x] 文生图
  • [ ] 前端
    • [x] 移动端适配
    • [x] 代码等内容流式输出优化

Quick Start

1. 执行数据库脚本

init-script/db.sql

2. 安装本地向量数据库

-- 安装启动本地向量数据库
docker-compose up -d 

3. 大语言模型

// 配置openai api token
openai.token=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# 或者启动本地chatglm2-6B模型
python .\openai_api.py

更多配置请查看

Wiki

如何构建高质量知识库文档

功能展示

登录 首页 功能2 功能3
功能4 功能5 功能6 功能7
功能8 功能9

聊天Demo

聊天 本地知识库 知识库 知识库 ## 项目交流群 二维码 二维码 🎉 langchain-springboot 项目微信交流群,如果你也对本项目感兴趣,欢迎加入群聊参与讨论交流。如群二维码已过期请扫我的个人二维码拉入群