Thanks you use gpt4-copilot-java-0.2.4
\n" + + "Thanks you use gpt4-copilot-java-0.2.5
\n" + " \n" + " \n" + "\n" + diff --git a/src/main/java/com/gpt4/copilot/copilotApplication.java b/src/main/java/com/gpt4/copilot/copilotApplication.java index 50484a1..0d3ad84 100644 --- a/src/main/java/com/gpt4/copilot/copilotApplication.java +++ b/src/main/java/com/gpt4/copilot/copilotApplication.java @@ -298,11 +298,9 @@ public class copilotApplication { System.out.println("one_selfCopilot_limit:" + ChatController.getSystemSetting().getOne_selfCopilot_limit()); System.out.println("gpt4-copilot-java 初始化接口成功!"); System.out.println("======================================================"); - System.out.println("******原神gpt4-copilot-java v0.2.4启动成功******"); + System.out.println("******原神gpt4-copilot-java v0.2.5启动成功******"); System.out.println("* 由于本人略菜,graalvm依赖问题无法解决,之后代码将只通过jar和docker的形式运行"); - System.out.println("* 修复部分bug,优化读取config.json代码,提升稳定性"); - System.out.println("* 新增token计算,优化报错,支持one_api重试机制"); - System.out.println("* 优化部分报错日志,提高日志可读性"); + System.out.println("* 适配最新的ui Open Webui"); System.out.println("URL地址:http://0.0.0.0:" + config.getServerPort() + config.getPrefix() + ""); System.out.println("======================================================"); } diff --git a/src/main/java/com/gpt4/copilot/pojo/streamResponse.java b/src/main/java/com/gpt4/copilot/pojo/streamResponse.java new file mode 100644 index 0000000..6edff20 --- /dev/null +++ b/src/main/java/com/gpt4/copilot/pojo/streamResponse.java @@ -0,0 +1,41 @@ +package com.gpt4.copilot.pojo; + +import com.alibaba.fastjson.annotation.JSONType; +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @author Yangyang + * @create 2024-04-26 11:17 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@JSONType(orders={"id","model","object","choices","created"}) +public class streamResponse { + private String id; + private String model; + private String object; + private Choice choice; + private String created; + + + @Data + @NoArgsConstructor + @AllArgsConstructor + @JSONType(orders={"index", "delta", "finish_reason"}) + public static class Choice { + private int index; + private Delta delta; + private String finish_reason; + } + + @Data + @NoArgsConstructor + @AllArgsConstructor + public static class Delta { + private String content; + + } +} diff --git a/target/classes/com/gpt4/copilot/controller/ChatController$1.class b/target/classes/com/gpt4/copilot/controller/ChatController$1.class index d930e21..c4c2113 100644 Binary files a/target/classes/com/gpt4/copilot/controller/ChatController$1.class and b/target/classes/com/gpt4/copilot/controller/ChatController$1.class differ diff --git a/target/classes/com/gpt4/copilot/controller/ChatController$2.class b/target/classes/com/gpt4/copilot/controller/ChatController$2.class index 145c0bb..63540d5 100644 Binary files a/target/classes/com/gpt4/copilot/controller/ChatController$2.class and b/target/classes/com/gpt4/copilot/controller/ChatController$2.class differ diff --git a/target/classes/com/gpt4/copilot/controller/ChatController.class b/target/classes/com/gpt4/copilot/controller/ChatController.class index 3e4cd68..c5f0aa9 100644 Binary files a/target/classes/com/gpt4/copilot/controller/ChatController.class and b/target/classes/com/gpt4/copilot/controller/ChatController.class differ diff --git a/target/classes/com/gpt4/copilot/controller/CustomErrorController.class b/target/classes/com/gpt4/copilot/controller/CustomErrorController.class index 3dc169a..712fc35 100644 Binary files a/target/classes/com/gpt4/copilot/controller/CustomErrorController.class and b/target/classes/com/gpt4/copilot/controller/CustomErrorController.class differ diff --git a/target/classes/com/gpt4/copilot/copilotApplication.class b/target/classes/com/gpt4/copilot/copilotApplication.class index 0c51a22..72f3460 100644 Binary files a/target/classes/com/gpt4/copilot/copilotApplication.class and b/target/classes/com/gpt4/copilot/copilotApplication.class differ diff --git a/target/classes/com/gpt4/copilot/pojo/streamResponse$Choice.class b/target/classes/com/gpt4/copilot/pojo/streamResponse$Choice.class new file mode 100644 index 0000000..39da9a0 Binary files /dev/null and b/target/classes/com/gpt4/copilot/pojo/streamResponse$Choice.class differ diff --git a/target/classes/com/gpt4/copilot/pojo/streamResponse$Delta.class b/target/classes/com/gpt4/copilot/pojo/streamResponse$Delta.class new file mode 100644 index 0000000..ac3bbf5 Binary files /dev/null and b/target/classes/com/gpt4/copilot/pojo/streamResponse$Delta.class differ diff --git a/target/classes/com/gpt4/copilot/pojo/streamResponse.class b/target/classes/com/gpt4/copilot/pojo/streamResponse.class new file mode 100644 index 0000000..1592b7c Binary files /dev/null and b/target/classes/com/gpt4/copilot/pojo/streamResponse.class differ diff --git a/target/gpt-4-copilot-0.2.4.jar.original b/target/gpt-4-copilot-0.2.4.jar.original deleted file mode 100644 index fc40652..0000000 Binary files a/target/gpt-4-copilot-0.2.4.jar.original and /dev/null differ diff --git a/target/gpt-4-copilot-0.2.4.jar b/target/gpt-4-copilot-0.2.5.jar similarity index 99% rename from target/gpt-4-copilot-0.2.4.jar rename to target/gpt-4-copilot-0.2.5.jar index 4378956..e86ffb6 100644 Binary files a/target/gpt-4-copilot-0.2.4.jar and b/target/gpt-4-copilot-0.2.5.jar differ diff --git a/target/gpt-4-copilot-0.2.5.jar.original b/target/gpt-4-copilot-0.2.5.jar.original new file mode 100644 index 0000000..7ecb434 Binary files /dev/null and b/target/gpt-4-copilot-0.2.5.jar.original differ diff --git a/target/maven-archiver/pom.properties b/target/maven-archiver/pom.properties index 3f0cfc5..17e36ad 100644 --- a/target/maven-archiver/pom.properties +++ b/target/maven-archiver/pom.properties @@ -1,3 +1,3 @@ artifactId=gpt-4-copilot groupId=com.gpt4.copilot -version=0.2.4 +version=0.2.5 diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst index 36a64ac..9180cbc 100644 --- a/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst @@ -1,12 +1,15 @@ com\gpt4\copilot\controller\ChatController.class com\gpt4\copilot\config\CorsConfig.class com\gpt4\copilot\pojo\Conversation$ConversationBuilderImpl.class +com\gpt4\copilot\pojo\streamResponse.class com\gpt4\copilot\copilotApplication.class +com\gpt4\copilot\pojo\streamResponse$Delta.class com\gpt4\copilot\controller\ChatController$1.class com\gpt4\copilot\pojo\Conversation$ConversationBuilder.class com\gpt4\copilot\config\WebConfig.class com\gpt4\copilot\controller\CustomErrorController.class com\gpt4\copilot\pojo\Conversation.class +com\gpt4\copilot\pojo\streamResponse$Choice.class com\gpt4\copilot\pojo\SystemSetting.class com\gpt4\copilot\pojo\Result.class com\gpt4\copilot\controller\ChatController$2.class diff --git a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst index c970c86..3be3273 100644 --- a/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst +++ b/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -4,5 +4,6 @@ F:\vue\fakeApiTool\graalvm-demos\spring-native-image\GPT4-Copilot\src\main\java\ F:\vue\fakeApiTool\graalvm-demos\spring-native-image\GPT4-Copilot\src\main\java\com\gpt4\copilot\pojo\Conversation.java F:\vue\fakeApiTool\graalvm-demos\spring-native-image\GPT4-Copilot\src\main\java\com\gpt4\copilot\pojo\SystemSetting.java F:\vue\fakeApiTool\graalvm-demos\spring-native-image\GPT4-Copilot\src\main\java\com\gpt4\copilot\controller\ChatController.java +F:\vue\fakeApiTool\graalvm-demos\spring-native-image\GPT4-Copilot\src\main\java\com\gpt4\copilot\pojo\streamResponse.java F:\vue\fakeApiTool\graalvm-demos\spring-native-image\GPT4-Copilot\src\main\java\com\gpt4\copilot\config\WebConfig.java F:\vue\fakeApiTool\graalvm-demos\spring-native-image\GPT4-Copilot\src\main\java\com\gpt4\copilot\copilotApplication.java