fix:登录判断优化
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user