Giter Club home page Giter Club logo

chatgpt-stream's Introduction

🔥你的chatgpt🔥

OpenAi最简洁的Java流式返回接入方式,没有第三方依赖,只需要使用Spring Boot即可!轻松构建你的带有聊天记忆、画图功能的chatgpt,支持代码块高亮、markdown语法!

  • 模型:gpt-3.5-turbo

特点

  • 无第三方依赖
  • 流式返回
  • 有聊天记忆
  • 画图

采用sse技术,感兴趣的可以先了解一下

👀效果

最初版本截图 截图1 截图2

时间轴

  • 2023-04-02 更换为vue渲染更加便捷,加入代码块高亮、表格markdown语法支持
  • 2023-04-01 优化样式、修复聊天记忆bug
  • 2023-03-29 使用netty提高并发能力
  • 2023-03-23-下午 增加了聊天记忆、画图功能
  • 2023-03-23 上午 第一版最简易版本demo,此版本代码在original-simplicity分支里

重要配置

authorization: 你的key

申请地址:https://platform.openai.com/

关于**大陆访问不通问题

  • 使用vpn代理
    • 此功能已经实现 请查看 OpenAiWebClient.java 配置好代理ip和端口即可
    HttpClient httpClient = HttpClient.create()
            .secure(sslContextSpec -> sslContextSpec.sslContext(finalSslContext))
            .tcpConfiguration(tcpClient -> tcpClient.proxy(proxy ->
                proxy.type(ProxyProvider.Proxy.HTTP).host("127.0.0.1").port(7890)));
  • 部署到海外
    • 取消如下配置即可
      env: test

启动

启动springboot 然后访问 http://127.0.0.1:8080/

后续功能

  • 流式返回
  • 聊天记忆
  • 图片接入
  • ....

交流方式

有问题可以提交issue,有想法也可以提交pr,欢迎大家

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.