Skip to content

Commit d637eb4

Browse files
committed
📝
1 parent f1338aa commit d637eb4

File tree

3 files changed

+44
-19
lines changed

3 files changed

+44
-19
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ OpenAI ChatGPT 的逆向工程SDK。可扩展用于聊天机器人等。觉得
1717

1818
![image](https://user-images.githubusercontent.com/15922823/206353660-47d99158-a664-4ade-b2f1-e2cc8ac68b74.png)
1919

20+
![image](https://user-images.githubusercontent.com/15922823/206615422-23c5e587-d29a-4f04-8d0d-f8dd7c19da37.png)
2021

2122
可以写代码,写小说,写作文、演讲稿、工作报告、读书笔记、合同等
2223
# [一些有趣的玩法](./USEAGE.md)

pom.xml

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -49,45 +49,40 @@
4949
<compile.version>8</compile.version>
5050
</properties>
5151
<dependencies>
52-
<dependency>
53-
<groupId>com.fasterxml.jackson.core</groupId>
54-
<artifactId>jackson-databind</artifactId>
55-
<version>2.13.4.2</version>
56-
</dependency>
5752

5853
<dependency>
5954
<groupId>org.projectlombok</groupId>
6055
<artifactId>lombok</artifactId>
6156
<version>1.18.24</version>
6257
<optional>true</optional>
58+
<scope>test</scope>
6359
</dependency>
6460

6561
<dependency>
6662
<groupId>net.dreamlu</groupId>
6763
<artifactId>mica-http</artifactId>
6864
<version>2.7.6</version>
6965
</dependency>
70-
<dependency>
71-
<groupId>com.google.code.gson</groupId>
72-
<artifactId>gson</artifactId>
73-
<version>2.9.1</version>
74-
</dependency>
66+
<!-- <dependency>-->
67+
<!-- <groupId>com.google.code.gson</groupId>-->
68+
<!-- <artifactId>gson</artifactId>-->
69+
<!-- <version>2.9.1</version>-->
70+
<!-- </dependency>-->
7571
<dependency>
7672
<groupId>com.alibaba.fastjson2</groupId>
7773
<artifactId>fastjson2</artifactId>
7874
<version>2.0.20</version>
79-
8075
</dependency>
8176
<!-- <dependency>-->
8277
<!-- <groupId>com.squareup.okhttp3</groupId>-->
8378
<!-- <artifactId>okhttp</artifactId>-->
8479
<!-- <version>3.14.9</version>-->
8580
<!-- </dependency>-->
86-
<dependency>
87-
<groupId>com.google.guava</groupId>
88-
<artifactId>guava</artifactId>
89-
<version>31.1-jre</version>
90-
</dependency>
81+
<!-- <dependency>-->
82+
<!-- <groupId>com.google.guava</groupId>-->
83+
<!-- <artifactId>guava</artifactId>-->
84+
<!-- <version>31.1-jre</version>-->
85+
<!-- </dependency>-->
9186
<dependency>
9287
<groupId>cn.hutool</groupId>
9388
<artifactId>hutool-core</artifactId>
@@ -179,6 +174,38 @@
179174
<artifactId>nexus-staging-maven-plugin</artifactId>
180175
</plugin>
181176

177+
<!-- 使用maven-jar-plugin和maven-dependency-plugin插件打包 -->
178+
<plugin>
179+
<groupId>org.apache.maven.plugins</groupId>
180+
<artifactId>maven-jar-plugin</artifactId>
181+
<version>3.1.0</version>
182+
<configuration>
183+
<archive>
184+
<manifest>
185+
<addClasspath>true</addClasspath>
186+
<classpathPrefix>lib/</classpathPrefix>
187+
<mainClass>com.github.plexpt.chatgpt.ChatGTP</mainClass>
188+
</manifest>
189+
</archive>
190+
</configuration>
191+
</plugin>
192+
<plugin>
193+
<groupId>org.apache.maven.plugins</groupId>
194+
<artifactId>maven-dependency-plugin</artifactId>
195+
<version>3.1.1</version>
196+
<executions>
197+
<execution>
198+
<id>copy-dependencies</id>
199+
<phase>package</phase>
200+
<goals>
201+
<goal>copy-dependencies</goal>
202+
</goals>
203+
<configuration>
204+
<outputDirectory>${project.build.directory}/lib</outputDirectory>
205+
</configuration>
206+
</execution>
207+
</executions>
208+
</plugin>
182209

183210
</plugins>
184211
</build>

src/main/java/com/github/plexpt/chatgpt/Chatbot.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.alibaba.fastjson2.JSON;
44
import com.alibaba.fastjson2.JSONArray;
55
import com.alibaba.fastjson2.JSONObject;
6-
import com.google.gson.Gson;
76

87
import java.util.Collections;
98
import java.util.HashMap;
@@ -27,8 +26,6 @@ public class Chatbot {
2726
private String parentIdPrev;
2827

2928

30-
private final Gson gson = new Gson();
31-
3229
public Chatbot(Map<String, String> config, String conversationId) {
3330
this.config = config;
3431
this.conversationId = conversationId;

0 commit comments

Comments
 (0)