mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-24 22:50:22 +09:00
去掉Debug日志打印
This commit is contained in:
parent
6f7a635030
commit
5bd7e28f82
@ -313,7 +313,7 @@ export function extractMessage(res: any, modelId: string = ""): string {
|
|||||||
console.error("[AWS Extract Error] extractMessage Empty response");
|
console.error("[AWS Extract Error] extractMessage Empty response");
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
console.log("[Response] extractMessage response: ", res);
|
// console.log("[Response] extractMessage response: ", res);
|
||||||
|
|
||||||
// Handle Mistral model response format
|
// Handle Mistral model response format
|
||||||
if (modelId.toLowerCase().includes("mistral")) {
|
if (modelId.toLowerCase().includes("mistral")) {
|
||||||
@ -347,8 +347,8 @@ export async function* transformBedrockStream(
|
|||||||
const parsed = parseEventData(value);
|
const parsed = parseEventData(value);
|
||||||
if (!parsed) continue;
|
if (!parsed) continue;
|
||||||
|
|
||||||
console.log("parseEventData=========================");
|
// console.log("parseEventData=========================");
|
||||||
console.log(parsed);
|
// console.log(parsed);
|
||||||
// Handle Mistral models
|
// Handle Mistral models
|
||||||
if (modelId.toLowerCase().includes("mistral")) {
|
if (modelId.toLowerCase().includes("mistral")) {
|
||||||
// If we have content, accumulate it
|
// If we have content, accumulate it
|
||||||
@ -357,8 +357,8 @@ export async function* transformBedrockStream(
|
|||||||
parsed.choices?.[0]?.message?.content
|
parsed.choices?.[0]?.message?.content
|
||||||
) {
|
) {
|
||||||
accumulatedText += parsed.choices?.[0]?.message?.content;
|
accumulatedText += parsed.choices?.[0]?.message?.content;
|
||||||
console.log("accumulatedText=========================");
|
// console.log("accumulatedText=========================");
|
||||||
console.log(accumulatedText);
|
// console.log(accumulatedText);
|
||||||
// Check for tool call in the accumulated text
|
// Check for tool call in the accumulated text
|
||||||
if (!toolCallStarted && accumulatedText.includes("```json")) {
|
if (!toolCallStarted && accumulatedText.includes("```json")) {
|
||||||
const jsonMatch = accumulatedText.match(
|
const jsonMatch = accumulatedText.match(
|
||||||
|
Loading…
Reference in New Issue
Block a user