diff --git a/src/main/java/com/gpt4/copilot/controller/ChatController.java b/src/main/java/com/gpt4/copilot/controller/ChatController.java index 832f37f..863cbd6 100644 --- a/src/main/java/com/gpt4/copilot/controller/ChatController.java +++ b/src/main/java/com/gpt4/copilot/controller/ChatController.java @@ -1414,7 +1414,7 @@ public class ChatController { continue; } String chat_message_id = resJson.getString("id"); - String timestamp = resJson.getString("created"); + long timestamp = resJson.getLong("created"); streamResponse.Choice choice = new streamResponse.Choice(0, new streamResponse.Delta(content), null); streamResponse streamResponse = new streamResponse(chat_message_id, "chat.completion.chunk", model, choice, timestamp); String tmpRes = "data: " + com.alibaba.fastjson.JSONObject.toJSONString(streamResponse) + "\n\n"; diff --git a/src/main/java/com/gpt4/copilot/pojo/streamResponse.java b/src/main/java/com/gpt4/copilot/pojo/streamResponse.java index 6edff20..73ea63c 100644 --- a/src/main/java/com/gpt4/copilot/pojo/streamResponse.java +++ b/src/main/java/com/gpt4/copilot/pojo/streamResponse.java @@ -18,7 +18,7 @@ public class streamResponse { private String model; private String object; private Choice choice; - private String created; + private long created; @Data diff --git a/target/classes/com/gpt4/copilot/controller/ChatController.class b/target/classes/com/gpt4/copilot/controller/ChatController.class index c5f0aa9..2d1c3a9 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/pojo/streamResponse.class b/target/classes/com/gpt4/copilot/pojo/streamResponse.class index 1592b7c..73c78ac 100644 Binary files a/target/classes/com/gpt4/copilot/pojo/streamResponse.class and b/target/classes/com/gpt4/copilot/pojo/streamResponse.class differ diff --git a/target/gpt-4-copilot-0.2.5.jar b/target/gpt-4-copilot-0.2.5.jar index e86ffb6..219601b 100644 Binary files a/target/gpt-4-copilot-0.2.5.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 index 7ecb434..6a7438d 100644 Binary files a/target/gpt-4-copilot-0.2.5.jar.original and b/target/gpt-4-copilot-0.2.5.jar.original differ