Skip to content

Commit b31bc66

Browse files
committed
remove fastjson for safe reason
1 parent 2434bae commit b31bc66

File tree

13 files changed

+1531
-15
lines changed

13 files changed

+1531
-15
lines changed

pom.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>com.github.plexpt</groupId>
77
<artifactId>chatgpt</artifactId>
8-
<version>4.4.0</version>
8+
<version>5.0.0</version>
99
<name>chatgpt</name>
1010
<description>ChatGPT4.0、 ChatGPT Java SDK.</description>
1111
<url>https://chat.plexpt.com</url>
@@ -98,12 +98,6 @@
9898
<artifactId>hutool-all</artifactId>
9999
<version>5.8.28</version>
100100
</dependency>
101-
102-
<dependency>
103-
<groupId>com.alibaba</groupId>
104-
<artifactId>fastjson</artifactId>
105-
<version>2.0.51</version>
106-
</dependency>
107101
<dependency>
108102
<groupId>com.squareup.okhttp3</groupId>
109103
<artifactId>okhttp-sse</artifactId>

src/main/java/com/plexpt/chatgpt/Audio.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import cn.hutool.core.util.RandomUtil;
44
import cn.hutool.http.ContentType;
55
import cn.hutool.http.Header;
6-
import com.alibaba.fastjson.JSON;
6+
import com.plexpt.chatgpt.util.fastjson.JSON;
77
import com.plexpt.chatgpt.api.Api;
88
import com.plexpt.chatgpt.entity.BaseResponse;
99
import com.plexpt.chatgpt.entity.audio.AudioResponse;

src/main/java/com/plexpt/chatgpt/ChatGPT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.plexpt.chatgpt;
22

3-
import com.alibaba.fastjson.JSON;
3+
import com.plexpt.chatgpt.util.fastjson.JSON;
44
import com.plexpt.chatgpt.api.Api;
55
import com.plexpt.chatgpt.entity.BaseResponse;
66
import com.plexpt.chatgpt.entity.billing.CreditGrantsResponse;

src/main/java/com/plexpt/chatgpt/Embedding.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import cn.hutool.core.util.RandomUtil;
44
import cn.hutool.http.ContentType;
55
import cn.hutool.http.Header;
6-
import com.alibaba.fastjson.JSON;
6+
import com.plexpt.chatgpt.util.fastjson.JSON;
77
import com.plexpt.chatgpt.api.Api;
88
import com.plexpt.chatgpt.entity.BaseResponse;
99
import com.plexpt.chatgpt.entity.embedding.EmbeddingRequest;

src/main/java/com/plexpt/chatgpt/Images.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import cn.hutool.core.util.RandomUtil;
44
import cn.hutool.http.ContentType;
55
import cn.hutool.http.Header;
6-
import com.alibaba.fastjson.JSON;
6+
import com.plexpt.chatgpt.util.fastjson.JSON;
77
import com.plexpt.chatgpt.api.Api;
88
import com.plexpt.chatgpt.entity.BaseResponse;
99
import com.plexpt.chatgpt.entity.images.Edits;

src/main/java/com/plexpt/chatgpt/entity/images/ImagesRensponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.plexpt.chatgpt.entity.images;
22

3-
import com.alibaba.fastjson.JSON;
3+
import com.plexpt.chatgpt.util.fastjson.JSON;
44
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
55
import lombok.Data;
66

src/main/java/com/plexpt/chatgpt/listener/AbstractStreamListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.plexpt.chatgpt.listener;
22

3-
import com.alibaba.fastjson.JSON;
3+
import com.plexpt.chatgpt.util.fastjson.JSON;
44
import com.plexpt.chatgpt.entity.chat.ChatChoice;
55
import com.plexpt.chatgpt.entity.chat.ChatCompletionResponse;
66
import com.plexpt.chatgpt.entity.chat.Message;

src/main/java/com/plexpt/chatgpt/util/fastjson/JSON.java

Lines changed: 269 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)