From 589b89114ac7f7442eefa2798744534ff9c25ad5 Mon Sep 17 00:00:00 2001 From: pt Date: Tue, 21 Mar 2023 20:45:18 +0800 Subject: [PATCH] fix --- pom.xml | 7 +------ src/main/java/com/plexpt/chatgpt/ChatGPT.java | 3 --- src/main/java/com/plexpt/chatgpt/ChatGPTStream.java | 2 -- src/main/java/com/plexpt/chatgpt/entity/chat/Message.java | 4 ---- 4 files changed, 1 insertion(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index 16c6e6a..30ca7b1 100644 --- a/pom.xml +++ b/pom.xml @@ -135,12 +135,7 @@ 4.13.2 test - - org.jetbrains - annotations - RELEASE - compile - + diff --git a/src/main/java/com/plexpt/chatgpt/ChatGPT.java b/src/main/java/com/plexpt/chatgpt/ChatGPT.java index bc94955..cbfb89b 100644 --- a/src/main/java/com/plexpt/chatgpt/ChatGPT.java +++ b/src/main/java/com/plexpt/chatgpt/ChatGPT.java @@ -9,8 +9,6 @@ import com.plexpt.chatgpt.entity.chat.Message; import com.plexpt.chatgpt.exception.ChatException; -import org.jetbrains.annotations.NotNull; - import java.math.BigDecimal; import java.net.Proxy; import java.util.Arrays; @@ -52,7 +50,6 @@ public class ChatGPT { /** * keys */ - @NotNull private String apiKey; private List apiKeyList; diff --git a/src/main/java/com/plexpt/chatgpt/ChatGPTStream.java b/src/main/java/com/plexpt/chatgpt/ChatGPTStream.java index aaa88b8..e3ca954 100644 --- a/src/main/java/com/plexpt/chatgpt/ChatGPTStream.java +++ b/src/main/java/com/plexpt/chatgpt/ChatGPTStream.java @@ -40,9 +40,7 @@ @AllArgsConstructor public class ChatGPTStream { - @NonNull private String apiKey; - private List apiKeyList; private OkHttpClient okHttpClient; diff --git a/src/main/java/com/plexpt/chatgpt/entity/chat/Message.java b/src/main/java/com/plexpt/chatgpt/entity/chat/Message.java index b8a7421..7e9e23d 100644 --- a/src/main/java/com/plexpt/chatgpt/entity/chat/Message.java +++ b/src/main/java/com/plexpt/chatgpt/entity/chat/Message.java @@ -1,7 +1,5 @@ package com.plexpt.chatgpt.entity.chat; -import org.jetbrains.annotations.NotNull; - import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -16,12 +14,10 @@ @NoArgsConstructor @Builder public class Message { - @NotNull /** * 目前支持三中角色参考官网,进行情景输入:https://platform.openai.com/docs/guides/chat/introduction */ private String role; - @NotNull private String content; public static Message of(String content) {