Giter Club home page Giter Club logo

flychat's Introduction

FlyChat

介绍

基于Java和ChatGPT的AI平台,已实现基本的问答和基于知识库的问题,暂时只有后端应用,没有前端。

Screenshot

框架

  • Spring Boot 2.7.13
  • JDK 17
  • Postgresql 15
  • MyBatis Plus
  • Lombok

技术要点

在线问答

上下文聊天

通过 Postgresql 实现聊天数据存储来实现上下文聊天,已实现流式输出结果,可以通过配置参数 maxTokens 来限制上下问问题的数量。

数据库存储了每次聊天对话的记录,在选择上下文聊天时,通过 chatId 获取历史消息,将历史问题以及回答消息都发送给 GPT。

知识库问答

知识库分词

已实现按照句子分词、段落分词、固定长度分词等分词方式,并通过ChatGPT进行Embedding

知识库匹配

通过Postgresql 插件 PGvector进行相似度匹配,获取与问题比较匹配的知识点

知识库问答

通过对问题进行Embedding,然后匹配知识库,构建Prompt,发送给ChatGPT获取答案。

私有部署问题

可导入知识库文件、文本对知识库进行构建,知识库存储在本地数据库,调用ChatGPT接口进行问答,简而言之,数据还是会给到ChatGPT,但是不是所有的数据都给过去,理论上是一个半私有或者部分私有部署的状态,如果要实现完全私有化则需要部署一套私有的大语言模型。

风险声明

本项目仅供学习和研究使用,不鼓励用于商业用途。对于因使用本项目而导致的任何损失,我们不承担任何责任。

后续计划

目前项目只有后端没有前端,所有期待感兴趣的前端、UI、测试小伙伴一起参与项目。 后续实现功能:

  • 增加类似与ChatPDF的功能
  • 增加AI应用功能
  • 集成其他大语言模型

联系方式

wechat:leecho571

LICENSE

MIT

前端部分基于

Chagpt-Web

flychat's People

Contributors

leecho571 avatar leecho avatar leefrank67 avatar

Stargazers

CaiCaiGou avatar Cloudflying avatar mz289 avatar  avatar  avatar  avatar  avatar  avatar ycyds avatar vihacker avatar  avatar gambol avatar  avatar Kernel avatar  Jiahui Zhu avatar ZimaBlue avatar  avatar  avatar  avatar Rodney Broadway avatar

Watchers

 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.