Code Monkey home page Code Monkey logo

langchain-springboot's Introduction

langchain-springboot

用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
stream-chat SSE
LLMs openai、chatglm2
embeddings openai、text2vec-transformers
vector store weaviate

langchain 原理

原理图

路线图

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

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

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

功能展示

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

聊天Demo

聊天

本地知识库

知识库

知识库

## 项目交流群

二维码

二维码

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

langchain-springboot's People

Contributors

hkh1012 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.