fix:登录判断优化

This commit is contained in:
Gsh
2025-06-30 16:02:39 +08:00
parent 3d22a2ef65
commit 6aefcdbed8
6 changed files with 31 additions and 11 deletions

View File

@@ -108,7 +108,7 @@ function handleDataChunk(chunk: AnyObject) {
// 另一种思考中形式content中有 <think></think> 的格式
// 一开始匹配到 <think> 开始,匹配到 </think> 结束,并处理标签中的内容为思考内容
console.log(chunk.choices,"chunk.choices")
console.log(chunk.choices, 'chunk.choices');
const parsedChunk = chunk.choices?.[0].delta.content;
if (parsedChunk) {
const thinkStart = parsedChunk.includes('<think>');
@@ -148,6 +148,7 @@ function handleDataChunk(chunk: AnyObject) {
// 封装错误处理逻辑
function handleError(err: any) {
console.log('Fetch error:-------', err);
console.error('Fetch error:', err);
}