Skip to content

Commit 2df239d

Browse files
committed
移除不必要的字符串检查,更新依赖
1 parent ce2fe0a commit 2df239d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

StegLLM/linux_mac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
set -x
3-
buildNum="b5186"
3+
buildNum="b5187"
44
scriptDir="$(dirname "$(realpath "$0")")"
55
dataDir="${scriptDir}/data"
66
# 确定系统和指令集

StegLLM/windows.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
@echo off
22
setlocal
3-
set "buildNum=b5186"
3+
set "buildNum=b5187"
44
set "scriptDir=%~dp0"
55
set "dataDir=%scriptDir%data"
66
:: 判断CPU指令集

src/src/pages/index.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ import Layout from '../layouts/Layout.astro';
311311
let body={//在api中设置system_prompt会导致性能严重下降
312312
"prompt": prompt,//支持输入多个prompt
313313
"response_fields":tailCompletion?["content","stopping_word"]:["completion_probabilities","tokens"],
314+
"logit_bias":[["�",false]]//避免在判断不可解码的token时产生干扰
314315
}
315316
if(tailCompletion){
316317
body["stop"]=punctuations;//动态截断

src/src/utils/commonUtils.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,8 +434,8 @@ const defaultOptions = {
434434
charRanges: [],
435435
// 需要检测的子串数组
436436
includeSubstrings: [
437-
"\r\n","\r\n\r\n",//windows系统的换行,但现代的编程中应该不用手动处理
438-
" \n"," \n"," \n\n"," \n\n",//实在不明白空格后再换行有什么意义
437+
"\r\n",//windows系统的换行,但现代的编程中应该不用手动处理
438+
" \n"//实在不明白空格后再换行有什么意义
439439
]
440440
};
441441
export function check(str, options = {}) {
@@ -453,6 +453,5 @@ export function check(str, options = {}) {
453453
if (rangesValid) return false;
454454
// 检测是否包含子串
455455
const substringsValid = config.includeSubstrings.some(substring => str.includes(substring));
456-
if (substringsValid) return false;
457-
return true;
456+
return !substringsValid;
458457
}

0 commit comments

Comments
 (0)