From 1da86b20707888ba416fe309bbc8a9fd2496f335 Mon Sep 17 00:00:00 2001 From: CatX_feitu <108512490+catx-feitu@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:16:28 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=BC=80=E5=8F=91=E6=97=B6?= =?UTF-8?q?=E8=BE=93=E5=87=BA=E7=9A=84=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HttpServer/api/v1/chat/Completions.java | 4 ---- .../HttpServer/api/v1/images/Generations.java | 1 - 2 files changed, 5 deletions(-) diff --git a/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/chat/Completions.java b/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/chat/Completions.java index 71c0f3a..4bd0cd5 100644 --- a/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/chat/Completions.java +++ b/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/chat/Completions.java @@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.javacord.api.entity.channel.Channel; import org.javacord.api.entity.channel.ChannelCategory; import org.javacord.api.entity.channel.ServerChannel; import org.javacord.api.entity.channel.TextChannel; @@ -203,7 +202,6 @@ public ResponseType handle(HandleType Handle) { os.write(("data: " + json.toJSONString() + "\n\n").getBytes(StandardCharsets.UTF_8)); os.flush(); } - logger.info(SendMessage.size()); int retryInterval = 200; // 等待时间间隔 单位为毫秒 int maxRetries = 300; // 最大尝试次数 int attempt = 0; // 当前尝试次数 @@ -219,7 +217,6 @@ public ResponseType handle(HandleType Handle) { } attempt = 0; } - logger.info(3); Channel.sendMessage("<@" + ConfigManage.Configs.CozeBot_id + ">" + SendMessage.get(SendMessage.size() - 1)).join(); while (!Reply.Done) { if (UsingStream) { // 启用流式返回 @@ -237,7 +234,6 @@ public ResponseType handle(HandleType Handle) { LatestTextMessage = Reply.TextMessage; update_choice.put("delta", update_delta); json.put("choices", new JSONObject[]{update_choice}); - logger.info(json.toJSONString()); // 负责发送 发送失败直接抛出异常关闭连接 os.write(("data: " + json.toJSONString() + "\n\n").getBytes(StandardCharsets.UTF_8)); diff --git a/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/images/Generations.java b/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/images/Generations.java index 6e65546..b239ad0 100644 --- a/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/images/Generations.java +++ b/src/main/java/catx/feitu/coze_discord_bridge/HttpServer/api/v1/images/Generations.java @@ -11,7 +11,6 @@ import com.alibaba.fastjson.JSONObject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.javacord.api.entity.channel.Channel; import org.javacord.api.entity.channel.ChannelCategory; import org.javacord.api.entity.channel.ServerChannel; import org.javacord.api.entity.channel.TextChannel;