From 29a39cb5a67975fb03425d2b9a99ed9972b021bf Mon Sep 17 00:00:00 2001 From: Yanyutin753 <153794571+YuWanTingbb@users.noreply.github.com> Date: Sun, 24 Mar 2024 11:53:38 +0800 Subject: [PATCH] =?UTF-8?q?feat=20=E4=BB=A3=E7=A0=81=E6=B3=A8=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/gpt4/copilot/controller/ChatController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/gpt4/copilot/controller/ChatController.java b/src/main/java/com/gpt4/copilot/controller/ChatController.java index 6f0da33..242fd80 100644 --- a/src/main/java/com/gpt4/copilot/controller/ChatController.java +++ b/src/main/java/com/gpt4/copilot/controller/ChatController.java @@ -657,6 +657,12 @@ public class ChatController { return getObjectResponseEntity(response, future); } + /** + * 返回异步responseEntity + * + * @param response + * future + */ private ResponseEntity getObjectResponseEntity(HttpServletResponse response, CompletableFuture> future) { ResponseEntity responseEntity; @@ -674,6 +680,12 @@ public class ChatController { return responseEntity; } + /** + * 获取url和apiKey + * @param authorizationHeader + * @param conversation + * @throws IOException + */ private String[] extractApiKeyAndRequestUrl(String authorizationHeader, Conversation conversation) throws IllegalArgumentException { if (conversation == null) { throw new IllegalArgumentException("Request body is missing or not in JSON format");