yxmiler commited on
Commit
c020777
·
verified ·
1 Parent(s): ff9e4c0

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +8 -3
index.js CHANGED
@@ -535,10 +535,15 @@ async function handleStreamResponse(response, model, res) {
535
  res.write(`data: ${JSON.stringify(responseData)}\n\n`);
536
  }
537
  }
 
 
 
 
 
 
 
538
  if (linejosn.response === "webSearchResults" && CONFIG.ISSHOW_SEARCH_RESULTS) {
539
- console.log("搜索结果判断:",linejosn.response === "webSearchResults" && CONFIG.ISSHOW_SEARCH_RESULTS);
540
- console.log("搜索结果是否开启:",CONFIG.ISSHOW_SEARCH_RESULTS);
541
- console.log("显示搜索结果");
542
  const searchResults = await Utils.organizeSearchResults(linejosn.webSearchResults);
543
  const responseData = MessageProcessor.createChatResponse(`<thinking>\r\n${searchResults}\r\n</thinking>\r\n`, model, true);
544
  res.write(`data: ${JSON.stringify(responseData)}\n\n`);
 
535
  res.write(`data: ${JSON.stringify(responseData)}\n\n`);
536
  }
537
  }
538
+ console.log("详细调试信息:", {
539
+ 'linejosn.response': linejosn.response,
540
+ 'webSearchResults判断': linejosn.response === "webSearchResults",
541
+ 'CONFIG.ISSHOW_SEARCH_RESULTS': CONFIG.ISSHOW_SEARCH_RESULTS,
542
+ 'CONFIG.ISSHOW_SEARCH_RESULTS类型': typeof CONFIG.ISSHOW_SEARCH_RESULTS,
543
+ '完整的linejosn对象': JSON.stringify(linejosn, null, 2)
544
+ });
545
  if (linejosn.response === "webSearchResults" && CONFIG.ISSHOW_SEARCH_RESULTS) {
546
+ console.log("进入了");
 
 
547
  const searchResults = await Utils.organizeSearchResults(linejosn.webSearchResults);
548
  const responseData = MessageProcessor.createChatResponse(`<thinking>\r\n${searchResults}\r\n</thinking>\r\n`, model, true);
549
  res.write(`data: ${JSON.stringify(responseData)}\n\n`);