support k 1.5 长思考

This commit is contained in:
Li Zhe 2025-02-10 16:52:57 +08:00
parent 8d3f794764
commit 8019add607

View File

@ -887,7 +887,7 @@ async function receiveStream(model: string, convId: string, stream: any): Promis
data.choices[0].message.content += result.text;
// if(result.summary)
// data.choices[0].message.content += result.summary;
// }
}
// 处理请求ID
else if(result.event == 'req') {
data.segment_id = result.id;
@ -1004,8 +1004,7 @@ function createTransStream(model: string, convId: string, stream: any, endCallba
{const exceptCharIndex = result.text.indexOf("<22>");
chunk = result.text.substring(0, exceptCharIndex == -1 ? result.text.length : exceptCharIndex);
}
// if(result.summary)
// chunk = "# " + result.summary + "\n"
logger.info('k1'+chunk)
if(!thinking){
chunk = "开始思考\n" + chunk