Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM openjdk:19
COPY target/chatgpt-plus-1.0.1-SNAPSHOT.jar /app.jar
EXPOSE 15600
CMD ["java", "-jar", "/app.jar"]
68 changes: 58 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# chatgpt-plus

To English Doc -> [English Doc](README_EN.md)

# 📖 项目简介

**ChatGPT自定义插件的客户端**
Expand All @@ -15,15 +17,26 @@
#### 流式输出:
<img width="433" alt="image" src="https://github.com/liyf1/chatgpt-plus/assets/49024327/9e6edb67-92ac-4fbe-8371-66bffb15bcc6">

### 自动决策
根据请求内容,内置决策模块自动识别需要使用的插件,无需指定对应的插件名,支持多个插件同时使用,例如:将北京的天气发送给4214142@gmail.com

### 目前已内置插件:
- [x] 当前时间查询
- [x] mid-journey图片生成
- [x] 城市天气查询
- [x] 新闻查询
- [x] 邮件发送
- .
- .
- .
- [✅] 当前时间查询
- [✅] mid-journey图片生成
- [✅] 城市天气查询
- [✅] 新闻查询
- [✅] 邮件发送
- [✅] 微博热搜
- [✅] 百度搜索
- [✅] 百度百科
- [✅] 谷歌搜索
- [✅] 网页链接读取
- [✅] AI每日技术资讯
- [✅] DallE3图片生成
- [✅] 每日早报
- [✅] 摸鱼日报
- [todo] B站视频总结
- [todo] 知识库引入,支持不同问题回复指定答案
- 持续更新中

# 🚀 快速开始
Expand Down Expand Up @@ -52,12 +65,47 @@ baidu.weather.secretKey =

## 新闻查询使用了聚合数据的接口,需要申请聚合数据的账号,然后创建应用,获取key,https://www.juhe.cn/docs/api/id/235
juhe.news.key =

## 项目中使用了动态IP获取实时数据,如需使用百度微博等功能需要配置 ,我使用的产品https://www.kuaidaili.com/doc/product/dps/#fetchtypeip
proxy.ip.signature =
proxy.ip.secretId =

## 接口的权限验证,配置后请求中必须带有token,否则会认证失败
chatgpt.api.token = 123456

server.port = 15600
```
### 二、docker启动
还未支持docker启动,很快会支持

docker pull uswccr.ccs.tencentyun.com/liyf/images:chatgpt-plus-v1.0
或者
docker pull a419820659/liyf007:chatgpt-plus-v1.0

```
version: '3'
services:
myapp:
image: chatgpt-plus-v1.0
ports:
- 15600:15600
environment:
- mj.service.url=http://xxxxx:8080
- chatgpt.api.key=sk-32131321ky8ph1231B2xxxxxvUqBX9
- mail.host=smtp.qq.com
- mail.port=465
- mail.username=xsds@qq.com
- mail.password=2312313
- mail.subject=AI Chatbot
- baidu.weather.accessKey=sds
- baidu.weather.secretKey=sds
- juhe.news.key=ds
- proxy.ip.signature=dsds
- proxy.ip.secretId=dsds
- chatgpt.api.token=123123
```

# 🙏 鸣谢
项目中依赖了大佬的代码,在此表示感谢🌹:
- OpenAi:https://openai.com/
- chatgpt-java: https://github.com/Grt1228/chatgpt-java
- midjourney-proxy: https://github.com/novicezk/midjourney-proxy 项目内非代码直接依赖,如需图片生成自己单独启动该项目
- midjourney-proxy: https://github.com/novicezk/midjourney-proxy 项目内非代码直接依赖,如需图片生成自己单独启动该项目
110 changes: 110 additions & 0 deletions README_EN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
# chatgpt-plus

To English Doc -> [中文文档](README.md)

# 📖 Project Introduction

**A client for custom ChatGPT plugins**

#### This project is the full-blooded plus version of Open AI's ChatGPT. It provides some additional capabilities on top of the official ChatGPT, such as querying for daily news, weather, gas prices, stock market, etc. There's nothing you can't imagine that it can't do. The project is developed based on OPEN AI's functional invocation and currently has some pre-installed plugins (which will continue to be updated). It also supports developers adding their own custom plugins. The project supports both streaming and non-streaming calling methods.

# 🚩 Features
#### Non-streaming output:
<img width="600" alt="image" src="https://github.com/liyf1/chatgpt-plus/assets/49024327/3bc7589c-3324-4dcd-addf-3de53aa9313f">
<img width="433" alt="image" src="https://github.com/liyf1/chatgpt-plus/assets/49024327/1e91215e-8263-4135-a21e-ca6e9dc40c81">


#### Streaming output:
<img width="433" alt="image" src="https://github.com/liyf1/chatgpt-plus/assets/49024327/9e6edb67-92ac-4fbe-8371-66bffb15bcc6">

### Automatic Decision-making
According to the request content, the built-in decision module automatically identifies the plugins that need to be used, without the need to specify the name of the corresponding plugin, and supports the use of multiple plugins simultaneously, for example: sending Beijing's weather to 4214142@gmail.com

### Currently Built-in Plugins:
- [✅] Current time query
- [✅] Mid-journey image generation
- [✅] City weather query
- [✅] News query
- [✅] Email sending
- [✅] Weibo hot search
- [✅] Baidu search
- [✅] Baidu encyclopedia
- [✅] Google search
- [✅] Web link reading
- [✅] AI daily tech news
- [✅] Dall-E 3 image generation
- [✅] Daily morning news
- [✅] Slack off daily
- [todo] Bilibili video summary
- Continuously updating

# 🚀 Quick Start
### I. Local Launch

Project environment requirements: jdk17
##### Environment Variables

```
## The project referenced the mid-journey proxy project, which must be launched separately. Enter the address after startup
mj.service.url = http://ip:port

## chatgpt api key
chatgpt.api.key = sk-xxxxx

## Configuration information for sending emails
mail.host = smtp.xx.com
mail.port = 465
mail.username = xxxx@xx.com
mail.password = xxxxxxx
mail.subject = AI Chatbot

## The weather query used the interface of Baidu Intelligent Cloud. You need to apply for a Baidu Intelligent Cloud account, then create an application to get accessKey and secretKey. https://apis.baidu.com/store/detail/d031401a-4081-4572-8dd7-aca64223197e
baidu.weather.accessKey =
baidu.weather.secretKey =

## The news query used the interface of Juhe Data. You need to apply for an account with Juhe Data, then create an application to get a key, https://www.juhe.cn/docs/api/id/235
juhe.news.key =

## The project used dynamic IP to get real-time data. To use functions like Baidu and Weibo, configure the following. I used the product https://www.kuaidaili.com/doc/product/dps/#fetchtypeip
proxy.ip.signature =
proxy.ip.secretId =

## Interface authentication, you must carry a token in the request after configuration, otherwise authentication will fail
chatgpt.api.token = 123456

server.port = 15600
```
### II. Docker Launch

docker pull uswccr.ccs.tencentyun.com/liyf/images:chatgpt-plus-v1.0
or
docker pull a419820659/liyf007:chatgpt-plus-v1.0

```
version: '3'
services:
myapp:
image: chatgpt-plus-v1.0
ports:
- 15600:15600
environment:
- mj.service.url=http://xxxxx:8080
- chatgpt.api.key=sk-32131321ky8ph1231B2xxxxxvUqBX9
- mail.host=smtp.qq.com
- mail.port=465
- mail.username=xsds@qq.com
- mail.password=2312313
- mail.subject=AI Chatbot
- baidu.weather.accessKey=sds
- baidu.weather.secretKey=sds
- juhe.news.key=ds
- proxy.ip.signature=dsds
- proxy.ip.secretId=dsds
- chatgpt.api.token=123123
```

# 🙏 Acknowledgments
The project depends on the code of great developers, I would like to express my thanks 🌹:
- OpenAi: https://openai.com/
- chatgpt-java: https://github.com/Grt1228/chatgpt-java
- midjourney-proxy: https://github.com/novicezk/midjourney-proxy The project does not have a direct code dependency, if you need image generation, you need to start the project separately
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3'
services:
myapp:
image: chatgpt-plus-v1.0
ports:
- 15600:15600
environment:
- mj.service.url=http://xxxxx:8080
- chatgpt.api.key=sk-xxxxx
- mail.host=smtp.qq.com
- mail.port=465
- mail.username=xsds@qq.com
- mail.password=xxxxxx
- mail.subject=AI Chatbot
- baidu.weather.accessKey=sds
- baidu.weather.secretKey=sds
- juhe.news.key=ds
- proxy.ip.signature=dsds
- proxy.ip.secretId=dsds
- chatgpt.api.token=123456



68 changes: 64 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,93 @@
</parent>
<groupId>com.liyf</groupId>
<artifactId>chatgpt-plus</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>1.0.1-SNAPSHOT</version>
<name>chatgpt-plus</name>
<description>chatgpt-plus</description>
<properties>
<java.version>17</java.version>
<java.version>19</java.version>
<httpclient.version>4.5</httpclient.version>
<lombok.version>1.18.8</lombok.version>
<lombok.version>1.18.26</lombok.version>
<guava.version>32.0.0-jre</guava.version>
<chatgpt-java.version>1.0.14</chatgpt-java.version>
<chatgpt-java.version>1.1.3</chatgpt-java.version>
<junit.version>4.13.2</junit.version>
<commons-lang3.version>3.12.0</commons-lang3.version>
<javax.mail.version>1.6.2</javax.mail.version>
<fastjson.version>2.0.31</fastjson.version>
<spring-version>4.3.7.RELEASE</spring-version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.8.12</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>

<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dashscope-sdk-java</artifactId>
<version>2.1.1</version>
</dependency>

<dependency>
<groupId>com.aliyun.oss</groupId>
<artifactId>aliyun-sdk-oss</artifactId>
<version>3.17.1</version>
</dependency>

<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>

<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio</artifactId>
<version>9.13.1</version>
</dependency>

<dependency>
<!-- 引入jsoup -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.13.1</version>
</dependency>

<dependency>
<groupId>io.github.hamawhitegg</groupId>
<artifactId>langchain-core</artifactId>
<version>0.1.9</version>
</dependency>

<dependency>
<groupId>dev.langchain4j</groupId>
<artifactId>langchain4j</artifactId>
<version>0.11.0</version>
</dependency>

<dependency>
<groupId>io.milvus</groupId>
<artifactId>milvus-sdk-java</artifactId>
<version>2.2.8</version>
</dependency>

<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down Expand Up @@ -107,6 +162,11 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
</plugins>
</build>

Expand Down
Loading