From 1874e2beb0480a4aa1d15f51c1ab69d636088aaa Mon Sep 17 00:00:00 2001 From: Archeb Date: Wed, 15 May 2024 13:39:42 +0800 Subject: [PATCH] improved Jailbreaking --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index cb721bf..d2765a9 100644 --- a/index.js +++ b/index.js @@ -111,7 +111,8 @@ app.post("/v1/messages", apiKeyAuth, (req, res) => { }) .join("\n\n"); - userQuery = "Please view the document and reply."; + // 试算最新一条human消息长度 + if(encodeURIComponent(userQuery).length > 30000) userQuery = "Please view the document and reply."; userMessage = []; // GET https://you.com/api/get_nonce to get nonce