fix display issue when a single newline appears after <think> tag
This commit is contained in:
parent
a899e9aceb
commit
6a25bdcf2d
|
@ -615,7 +615,8 @@ export function streamWithThink(
|
||||||
if (chunk.content.includes("\n\n")) {
|
if (chunk.content.includes("\n\n")) {
|
||||||
const lines = chunk.content.split("\n\n");
|
const lines = chunk.content.split("\n\n");
|
||||||
remainText += lines.join("\n\n> ");
|
remainText += lines.join("\n\n> ");
|
||||||
} else {
|
} else if (chunk.content != "\n") {
|
||||||
|
// deal with single newline after <think> tag
|
||||||
remainText += chunk.content;
|
remainText += chunk.content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue